MCPcopy
hub / github.com/perkeep/perkeep / serveSignerPaths

Method serveSignerPaths

pkg/search/handler.go:919–930  ·  view source on GitHub ↗
(rw http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

917}
918
919func (h *Handler) serveSignerPaths(rw http.ResponseWriter, req *http.Request) {
920 defer httputil.RecoverJSON(rw, req)
921 var sr SignerPathsRequest
922 sr.fromHTTP(req)
923
924 res, err := h.GetSignerPaths(&sr)
925 if err != nil {
926 httputil.ServeJSONError(rw, err)
927 return
928 }
929 httputil.ReturnJSON(rw, res)
930}
931
932// EvalSearchInput checks if its input is JSON. If so it returns a Constraint constructed from that JSON. Otherwise
933// it assumes the input to be a search expression. It parses the expression and returns the parsed Constraint.

Callers

nothing calls this directly

Calls 5

fromHTTPMethod · 0.95
GetSignerPathsMethod · 0.95
RecoverJSONFunction · 0.92
ServeJSONErrorFunction · 0.92
ReturnJSONFunction · 0.92

Tested by

no test coverage detected