lfstransfer

package
v14.47.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package lfstransfer wraps https://github.com/charmbracelet/git-lfs-transfer logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Config     *config.Config
	Args       *commandargs.Shell
	ReadWriter *readwriter.ReadWriter
}

Command handles git-lfs-transfer operations

func (*Command) Execute

func (c *Command) Execute(ctx context.Context) (context.Context, error)

Execute runs the git-lfs-transfer command

type GitlabAuthentication

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

GitlabAuthentication holds authentication details for GitLab LFS operations

type GitlabBackend

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

GitlabBackend implements the LFS transfer backend for GitLab

func NewGitlabBackend

func NewGitlabBackend(ctx context.Context, config *config.Config, args *commandargs.Shell, auth *GitlabAuthentication) (*GitlabBackend, error)

NewGitlabBackend creates a new GitLab LFS transfer backend

func (*GitlabBackend) Batch

func (b *GitlabBackend) Batch(op string, pointers []transfer.BatchItem, args transfer.Args) ([]transfer.BatchItem, error)

Batch processes a batch of LFS objects for the given operation

func (*GitlabBackend) Download

func (b *GitlabBackend) Download(oid string, args transfer.Args) (io.ReadCloser, int64, error)

Download downloads an LFS object from GitLab

func (*GitlabBackend) LockBackend

func (b *GitlabBackend) LockBackend(args transfer.Args) transfer.LockBackend

LockBackend returns a lock backend for managing LFS locks

func (*GitlabBackend) Upload added in v14.38.0

func (b *GitlabBackend) Upload(oid string, _ int64, r io.Reader, args transfer.Args) error

Upload uploads an LFS object to GitLab

func (*GitlabBackend) Verify

func (b *GitlabBackend) Verify(_ string, _ int64, _ transfer.Args) (transfer.Status, error)

Verify verifies an LFS object (verification is done during upload)

type WrappedLoggerForGitLFSTransfer

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

WrappedLoggerForGitLFSTransfer is responsible for creating a compatible logger for github.com/charmbracelet/git-lfs-transfer

func NewWrappedLoggerForGitLFSTransfer

func NewWrappedLoggerForGitLFSTransfer(ctx context.Context) *WrappedLoggerForGitLFSTransfer

NewWrappedLoggerForGitLFSTransfer returns a new WrappedLoggerForGitLFSTransfer passing through context.Context

func (*WrappedLoggerForGitLFSTransfer) Log

func (l *WrappedLoggerForGitLFSTransfer) Log(msg string, args ...any)

Log allows logging in github.com/charmbracelet/git-lfs-transfer to take place using gitlab.com/gitlab-org/labkit/v2/log

Jump to

Keyboard shortcuts

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