MCPcopy
hub / github.com/perkeep/perkeep / serveEdgesTo

Method serveEdgesTo

pkg/search/handler.go:848–858  ·  view source on GitHub ↗

Unlike the index interface's EdgesTo method, the "edgesto" Handler here additionally filters out since-deleted permanode edges.

(rw http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

846// Unlike the index interface's EdgesTo method, the "edgesto" Handler
847// here additionally filters out since-deleted permanode edges.
848func (h *Handler) serveEdgesTo(rw http.ResponseWriter, req *http.Request) {
849 defer httputil.RecoverJSON(rw, req)
850 var er EdgesRequest
851 er.fromHTTP(req)
852 res, err := h.EdgesTo(&er)
853 if err != nil {
854 httputil.ServeJSONError(rw, err)
855 return
856 }
857 httputil.ReturnJSON(rw, res)
858}
859
860func (h *Handler) serveQuery(rw http.ResponseWriter, req *http.Request) {
861 defer httputil.RecoverJSON(rw, req)

Callers

nothing calls this directly

Calls 5

fromHTTPMethod · 0.95
EdgesToMethod · 0.95
RecoverJSONFunction · 0.92
ServeJSONErrorFunction · 0.92
ReturnJSONFunction · 0.92

Tested by

no test coverage detected