lfstransfer

package
v14.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientHeader = "application/vnd.git-lfs+json"

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"`
}

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"`
}

type BatchResponse

type BatchResponse struct {
	Objects       []*BatchObject `json:"objects"`
	HashAlgorithm string         `json:"hash_algo,omitempty"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config *config.Config, args *commandargs.Shell, href string, auth string) (*Client, error)

func (*Client) Batch

func (c *Client) Batch(operation string, reqObjects []*BatchObject, ref string, reqHashAlgo string) (*BatchResponse, error)

func (*Client) GetObject added in v14.36.0

func (c *Client) GetObject(oid, href string, headers map[string]string) (fs.File, error)

func (*Client) ListLocksVerify added in v14.36.0

func (c *Client) ListLocksVerify(path, id, cursor string, limit int, ref string) (*ListLocksVerifyResponse, error)

func (*Client) Lock added in v14.36.0

func (c *Client) Lock(path, refname string) (*Lock, error)

func (*Client) PutObject added in v14.36.0

func (c *Client) PutObject(oid, href string, headers map[string]string, r io.Reader) error

func (*Client) Unlock added in v14.36.0

func (c *Client) Unlock(id string, force bool, refname string) (*Lock, error)

type ListLocksResponse added in v14.36.0

type ListLocksResponse struct {
	Locks      []*Lock `json:"locks,omitempty"`
	NextCursor string  `json:"next_cursor,omitempty"`
}

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"`
}

type Lock added in v14.36.0

type Lock struct {
	ID       string     `json:"id"`
	Path     string     `json:"path"`
	LockedAt time.Time  `json:"locked_at"`
	Owner    *LockOwner `json:"owner"`
}

type LockOwner added in v14.36.0

type LockOwner struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL