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

Method GetRecentPermanodes

pkg/client/client.go:679–698  ·  view source on GitHub ↗

GetRecentPermanodes implements search.GetRecentPermanoder against a remote server over HTTP.

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

Source from the content-addressed store, hash-verified

677
678// GetRecentPermanodes implements search.GetRecentPermanoder against a remote server over HTTP.
679func (c *Client) GetRecentPermanodes(ctx context.Context, req *search.RecentRequest) (*search.RecentResponse, error) {
680 sr, err := c.SearchRoot()
681 if err != nil {
682 return nil, err
683 }
684 url := sr + req.URLSuffix()
685 hreq := c.newRequest(ctx, "GET", url)
686 hres, err := c.expect2XX(hreq)
687 if err != nil {
688 return nil, err
689 }
690 res := new(search.RecentResponse)
691 if err := httputil.DecodeJSON(hres, res); err != nil {
692 return nil, err
693 }
694 if err := res.Err(); err != nil {
695 return nil, err
696 }
697 return res, nil
698}
699
700// GetPermanodesWithAttr searches for permanodes that match the given search request.
701// The Fuzzy option in the request must not be set, and the Attribute option

Callers

nothing calls this directly

Calls 6

SearchRootMethod · 0.95
newRequestMethod · 0.95
expect2XXMethod · 0.95
DecodeJSONFunction · 0.92
URLSuffixMethod · 0.45
ErrMethod · 0.45

Tested by

no test coverage detected