package
1.24.0-dev
Repository: https://github.com/go-gitea/gitea.git
Documentation: pkg.go.dev

# Functions

DetermineEndpoint determines an endpoint from the clone url or uses the specified LFS url.
GeneratePointer generates a pointer for arbitrary content.
NewClient creates a LFS client.
NewContentStore creates the default ContentStore.
ReadMetaObject will read a git_model.LFSMetaObject and return a reader.
ReadPointer tries to read LFS pointer data from the reader.
ReadPointerFromBuffer will return a pointer if the provided byte slice is a pointer file or an error otherwise.
SearchPointerBlobs scans the whole repository for LFS pointer files.

# Constants

AcceptHeader Some LFS servers offer content with other types, so fallback to '*/*' if application/vnd.git-lfs+json cannot be served.
MediaType contains the media type for LFS server requests.
MetaFileIdentifier is the string appearing at the first line of LFS pointer files.
MetaFileOidPrefix appears in LFS pointer files on a line before the sha256 hash.
UserAgentHeader Add User-Agent for gitea's self-implemented lfs client, and the version is consistent with the latest version of git lfs can be avoided incompatibilities.

# Variables

ErrHashMismatch occurs if the content has does not match OID.
ErrInvalidOIDFormat occurs if the oid has an invalid format.
ErrInvalidStructure occurs if the content has an invalid structure.
ErrMissingPrefix occurs if the content lacks the LFS prefix.
the object does not exist on the server.
ErrSizeMismatch occurs if the content size does not match.

# Structs

BasicTransferAdapter implements the "basic" adapter.
BatchRequest contains multiple requests processed in one batch operation.
BatchResponse contains multiple object metadata Representation structures for use with the batch API.
ContentStore provides a simple file system based storage.
ErrorResponse describes the error to the client.
FilesystemClient is used to read LFS data from a filesystem path.
HTTPClient is used to communicate with the LFS server https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md.
Link provides a structure with information about how to access a object.
ObjectError defines the JSON structure returned to the client in case of an error.
ObjectResponse is object metadata as seen by clients of the LFS server.
Pointer contains LFS pointer data.
PointerBlob associates a Git blob with a Pointer.
Reference contains a git reference.

# Interfaces

Client is used to communicate with a LFS source.
TransferAdapter represents an adapter for downloading/uploading LFS objects.

# Type aliases

DownloadCallback gets called for every requested LFS object to process its content.
UploadCallback gets called for every requested LFS object to provide its content.