MCPcopy
hub / github.com/perkeep/perkeep / Query

Method Query

pkg/client/client.go:779–789  ·  view source on GitHub ↗
(ctx context.Context, req *search.SearchQuery)

Source from the content-addressed store, hash-verified

777}
778
779func (c *Client) Query(ctx context.Context, req *search.SearchQuery) (*search.SearchResult, error) {
780 hres, err := c.query(ctx, req)
781 if err != nil {
782 return nil, err
783 }
784 res := new(search.SearchResult)
785 if err := httputil.DecodeJSON(hres, res); err != nil {
786 return nil, err
787 }
788 return res, nil
789}
790
791// QueryRaw sends req and returns the body of the response, which should be the
792// unparsed JSON of a search.SearchResult.

Callers

nothing calls this directly

Calls 2

queryMethod · 0.95
DecodeJSONFunction · 0.92

Tested by

no test coverage detected