Help us shape the future of Go! Take the 2026 Go Developer Survey

backend

package
v3.1.61 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT, MIT Imports: 18 Imported by: 0

Documentation

Index

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

func New

func New(ctx context.Context, repo, op, token string, logger transfer.Logger) (transfer.Backend, error)

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, retErr 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.

func (*GiteaBackend) Upload

func (g *GiteaBackend) Upload(oid string, size int64, r io.Reader, args transfer.Args) error

Upload implements transfer.Backend.

func (*GiteaBackend) Verify

func (g *GiteaBackend) Verify(oid string, size int64, args transfer.Args) (transfer.Status, error)

Verify implements transfer.Backend.

Source Files

  • backend.go
  • lock.go
  • util.go

Jump to

Keyboard shortcuts

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