aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Lee <ethanalee@google.com>2026-04-09 20:00:10 +0000
committerGopher Robot <gobot@golang.org>2026-04-09 13:33:33 -0700
commit2099864dd3354159a4e0e9fb69fbb1f5d962399e (patch)
tree2d098a2e09d73e33f21d363e01a5bdaf7562964e
parentee3de85430431a53d070e4712a5caa9ddcc28628 (diff)
downloadgo-x-pkgsite-2099864dd3354159a4e0e9fb69fbb1f5d962399e.tar.xz
internal/frontend: add v1/search endpoint
Change-Id: I53fc1becbee21fcc586e00f4e3d93f636eaaba4c Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/764960 kokoro-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> Auto-Submit: Ethan Lee <ethanalee@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Ethan Lee <ethanalee@google.com>
-rw-r--r--internal/frontend/server.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/frontend/server.go b/internal/frontend/server.go
index 374e59fd..abdb4d9d 100644
--- a/internal/frontend/server.go
+++ b/internal/frontend/server.go
@@ -242,6 +242,7 @@ func (s *Server) Install(handle func(string, http.Handler), cacher Cacher, authV
handle("GET /v1/module/", s.apiHandler(api.ServeModule))
handle("GET /v1/versions/", s.apiHandler(api.ServeModuleVersions))
handle("GET /v1/packages/", s.apiHandler(api.ServeModulePackages))
+ handle("GET /v1/search/", s.apiHandler(api.ServeSearch))
handle("GET /v1/vulns/", s.apiHandler(api.ServeVulnerabilities(s.vulnClient)))
handle("/opensearch.xml", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
serveFileFS(w, r, s.staticFS, "shared/opensearch.xml")