MCPcopy
hub / github.com/git-lfs/git-lfs / SearchVerifiable

Method SearchVerifiable

locking/api.go:279–301  ·  view source on GitHub ↗
(remote string, vreq *lockVerifiableRequest)

Source from the content-addressed store, hash-verified

277}
278
279func (c *httpLockClient) SearchVerifiable(remote string, vreq *lockVerifiableRequest) (*lockVerifiableList, int, error) {
280 e := c.Endpoints.Endpoint("upload", remote)
281 req, err := c.NewRequest("POST", e, "locks/verify", vreq)
282 if err != nil {
283 return nil, 0, err
284 }
285
286 req = c.Client.LogRequest(req, "lfs.locks.verify")
287 res, err := c.DoAPIRequestWithAuth(remote, req)
288 if err != nil {
289 if res != nil {
290 return nil, res.StatusCode, err
291 }
292 return nil, 0, err
293 }
294
295 locks := &lockVerifiableList{}
296 if res.StatusCode == http.StatusOK {
297 err = lfshttp.DecodeJSON(res, locks)
298 }
299
300 return locks, res.StatusCode, err
301}
302
303// User represents the owner of a lock.
304type User struct {

Callers 1

TestAPISearchVerifiableFunction · 0.95

Calls 5

DecodeJSONFunction · 0.92
DoAPIRequestWithAuthMethod · 0.80
EndpointMethod · 0.65
NewRequestMethod · 0.45
LogRequestMethod · 0.45

Tested by 1

TestAPISearchVerifiableFunction · 0.76