Documentation
¶
Overview ¶
Package lfstransfer provides functionality for handling LFS (Large File Storage) transfers.
Index ¶
- Variables
- type BatchAction
- type BatchObject
- type BatchResponse
- type Client
- func (c *Client) Batch(operation string, reqObjects []*BatchObject, ref string, reqHashAlgo string) (*BatchResponse, error)
- func (c *Client) GetObject(_, href string, headers map[string]string) (io.ReadCloser, int64, error)
- func (c *Client) ListLocksVerify(path, id, cursor string, limit int, ref string) (*ListLocksVerifyResponse, error)
- func (c *Client) Lock(path, refname string) (*Lock, error)
- func (c *Client) PutObject(_, href string, headers map[string]string, r io.Reader) error
- func (c *Client) Unlock(id string, force bool, refname string) (*Lock, error)
- type ListLocksResponse
- type ListLocksVerifyResponse
- type Lock
- type LockOwner
Constants ¶
This section is empty.
Variables ¶
var ClientHeader = "application/vnd.git-lfs+json"
ClientHeader specifies the content type for Git LFS JSON requests.
Functions ¶
This section is empty.
Types ¶
type BatchAction ¶
type BatchAction struct {
Href string `json:"href"`
Header map[string]string `json:"header,omitempty"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
ExpiresIn int `json:"expires_in,omitempty"`
}
BatchAction represents an action for a batch operation with metadata.
type BatchObject ¶
type BatchObject struct {
Oid string `json:"oid,omitempty"`
Size int64 `json:"size"`
Authenticated bool `json:"authenticated,omitempty"`
Actions map[string]*BatchAction `json:"actions,omitempty"`
}
BatchObject represents an object in a batch operation with its metadata and actions.
type BatchResponse ¶
type BatchResponse struct {
Objects []*BatchObject `json:"objects"`
HashAlgorithm string `json:"hash_algo,omitempty"`
}
BatchResponse contains batch operation results and the hash algorithm used.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client holds configuration, arguments, and authentication details for the client.
func NewClient ¶
func NewClient(config *config.Config, args *commandargs.Shell, href string, auth string) (*Client, error)
NewClient creates a new Client instance using the provided configuration and credentials.
func (*Client) Batch ¶
func (c *Client) Batch(operation string, reqObjects []*BatchObject, ref string, reqHashAlgo string) (*BatchResponse, error)
Batch performs a batch operation on objects and returns the result.
func (*Client) ListLocksVerify ¶ added in v14.36.0
func (c *Client) ListLocksVerify(path, id, cursor string, limit int, ref string) (*ListLocksVerifyResponse, error)
ListLocksVerify retrieves locks for the given path and id, with optional pagination.
func (*Client) Lock ¶ added in v14.36.0
Lock acquires a lock for the specified path with an optional reference name.
type ListLocksResponse ¶ added in v14.36.0
type ListLocksResponse struct {
Locks []*Lock `json:"locks,omitempty"`
NextCursor string `json:"next_cursor,omitempty"`
}
ListLocksResponse contains a list of locks and a cursor for pagination.
type ListLocksVerifyResponse ¶ added in v14.36.0
type ListLocksVerifyResponse struct {
Ours []*Lock `json:"ours,omitempty"`
Theirs []*Lock `json:"theirs,omitempty"`
NextCursor string `json:"next_cursor,omitempty"`
}
ListLocksVerifyResponse provides lists of locks for "ours" and "theirs" with a cursor for pagination.