MCPcopy Index your code
hub / github.com/perkeep/perkeep / QueryRaw

Method QueryRaw

pkg/client/client.go:793–800  ·  view source on GitHub ↗

QueryRaw sends req and returns the body of the response, which should be the unparsed JSON of a search.SearchResult.

(ctx context.Context, req *search.SearchQuery)

Source from the content-addressed store, hash-verified

791// QueryRaw sends req and returns the body of the response, which should be the
792// unparsed JSON of a search.SearchResult.
793func (c *Client) QueryRaw(ctx context.Context, req *search.SearchQuery) ([]byte, error) {
794 hres, err := c.query(ctx, req)
795 if err != nil {
796 return nil, err
797 }
798 defer hres.Body.Close()
799 return io.ReadAll(hres.Body)
800}
801
802// SearchExistingFileSchema does a search query looking for an
803// existing file with entire contents of wholeRef, then does a HEAD

Callers

nothing calls this directly

Calls 3

queryMethod · 0.95
ReadAllMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected