Versions in this module Expand all Collapse all v1 v1.5.6 Feb 16, 2017 GO-2021-0073 +2 more GO-2021-0073: Arbitrary command execution in github.com/git-lfs/git-lfs GO-2025-3390: Git LFS permits exfiltration of credentials via crafted HTTP URLs in github.com/git-lfs/git-lfs GO-2025-4038: Git LFS may write to arbitrary files via crafted symlinks in github.com/git-lfs/git-lfs Changes in this version + const MediaType + var ErrNoOperationGiven = errors.New("lfs/api: no operation provided in schema") + func DoBatchRequest(cfg *config.Configuration, req *http.Request) (*http.Response, *batchResponse, error) + func DoRequest(req *http.Request, useCreds bool) (*http.Response, error) + func NewBatchRequest(cfg *config.Configuration, operation string) (*http.Request, error) + func NewRequest(cfg *config.Configuration, method, oid string) (*http.Request, error) + func ObjectUrl(endpoint config.Endpoint, oid string) (*url.URL, error) + func VerifyUpload(cfg *config.Configuration, obj *ObjectResource) error + type Client struct + Locks LockService + func NewClient(lifecycle Lifecycle) *Client + func (c *Client) Do(schema *RequestSchema) (Response, error) + type Committer struct + Email string + Name string + func CurrentCommitter() Committer + type EndpointSource interface + Endpoint func(operation string) config.Endpoint + type Filter struct + Property string + Value string + type HttpLifecycle struct + func NewHttpLifecycle(endpoints EndpointSource) *HttpLifecycle + func (l *HttpLifecycle) Build(schema *RequestSchema) (*http.Request, error) + func (l *HttpLifecycle) Cleanup(resp Response) error + func (l *HttpLifecycle) Execute(req *http.Request, into interface{}) (Response, error) + type HttpResponse struct + func WrapHttpResponse(r *http.Response) *HttpResponse + func (h *HttpResponse) Body() io.ReadCloser + func (h *HttpResponse) Header() http.Header + func (h *HttpResponse) Proto() string + func (h *HttpResponse) Status() string + func (h *HttpResponse) StatusCode() int + type Lifecycle interface + Build func(req *RequestSchema) (*http.Request, error) + Cleanup func(resp Response) error + Execute func(req *http.Request, into interface{}) (Response, error) + type LinkRelation struct + ExpiresAt time.Time + Header map[string]string + Href string + type Lock struct + CommitSHA string + Committer Committer + Id string + LockedAt time.Time + Path string + UnlockedAt time.Time + func (l *Lock) Active() bool + type LockList struct + Err string + Locks []Lock + NextCursor string + type LockRequest struct + Committer Committer + LatestRemoteCommit string + Path string + type LockResponse struct + CommitNeeded string + Err string + Lock *Lock + type LockSearchRequest struct + Cursor string + Filters []Filter + Limit int + type LockService struct + func (s *LockService) Lock(req *LockRequest) (*RequestSchema, *LockResponse) + func (s *LockService) Search(req *LockSearchRequest) (*RequestSchema, *LockList) + func (s *LockService) Unlock(id string, force bool) (*RequestSchema, *UnlockResponse) + type ObjectError struct + Code int + Message string + func (e *ObjectError) Error() string + type ObjectResource struct + Actions map[string]*LinkRelation + Authenticated bool + Error *ObjectError + Links map[string]*LinkRelation + Oid string + Size int64 + func Batch(cfg *config.Configuration, objects []*ObjectResource, operation string, ...) (objs []*ObjectResource, transferAdapter string, e error) + func BatchOrLegacy(cfg *config.Configuration, objects []*ObjectResource, operation string, ...) (objs []*ObjectResource, transferAdapter string, e error) + func BatchOrLegacySingle(cfg *config.Configuration, inobj *ObjectResource, operation string, ...) (obj *ObjectResource, transferAdapter string, e error) + func DoLegacyRequest(cfg *config.Configuration, req *http.Request) (*http.Response, *ObjectResource, error) + func DownloadCheck(cfg *config.Configuration, oid string) (*ObjectResource, error) + func Legacy(cfg *config.Configuration, objects []*ObjectResource, operation string) ([]*ObjectResource, error) + func UploadCheck(cfg *config.Configuration, oid string, size int64) (*ObjectResource, error) + func (o *ObjectResource) IsExpired(now time.Time) (time.Time, bool) + func (o *ObjectResource) NeedsAuth() bool + func (o *ObjectResource) NewRequest(relation, method string) (*http.Request, error) + func (o *ObjectResource) Rel(name string) (*LinkRelation, bool) + type Operation string + const DownloadOperation + const UploadOperation + type RequestSchema struct + Body interface{} + Into interface{} + Method string + Operation Operation + Path string + Query map[string]string + type Response interface + Body func() io.ReadCloser + Proto func() string + Status func() string + StatusCode func() int + type UnlockRequest struct + Force bool + Id string + type UnlockResponse struct + Err string + Lock *Lock