Documentation ¶
Index ¶
- Constants
- Variables
- func New(ctx context.Context, repo, op, token string, logger transfer.Logger) (transfer.Backend, error)
- type GiteaBackend
- func (g *GiteaBackend) Batch(_ string, pointers []transfer.BatchItem, args transfer.Args) ([]transfer.BatchItem, error)
- func (g *GiteaBackend) Download(oid string, args transfer.Args) (io.ReadCloser, int64, error)
- func (g *GiteaBackend) LockBackend(_ transfer.Args) transfer.LockBackend
- func (g *GiteaBackend) Upload(oid string, size int64, r io.Reader, args transfer.Args) error
- func (g *GiteaBackend) Verify(oid string, size int64, args transfer.Args) (transfer.Status, error)
Constants ¶
View Source
const Version = "1"
Version is the git-lfs-transfer protocol version number.
Variables ¶
View Source
var Capabilities = []string{ "version=" + Version, "locking", }
Capabilities is a list of Git LFS capabilities supported by this package.
View Source
var ErrMissingID = fmt.Errorf("%w: missing id arg", transfer.ErrMissingData)
Functions ¶
Types ¶
type GiteaBackend ¶
type GiteaBackend struct {
// contains filtered or unexported fields
}
GiteaBackend is an adapter between git-lfs-transfer library and Gitea's internal LFS API
func (*GiteaBackend) Batch ¶
func (g *GiteaBackend) Batch(_ string, pointers []transfer.BatchItem, args transfer.Args) ([]transfer.BatchItem, error)
Batch implements transfer.Backend
func (*GiteaBackend) Download ¶
func (g *GiteaBackend) Download(oid string, args transfer.Args) (io.ReadCloser, int64, error)
Download implements transfer.Backend. The returned reader must be closed by the caller.
func (*GiteaBackend) LockBackend ¶
func (g *GiteaBackend) LockBackend(_ transfer.Args) transfer.LockBackend
LockBackend implements transfer.Backend.
Click to show internal directories.
Click to hide internal directories.