oci

package
v0.0.0-...-fc78dae Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package oci facilitates transferring of git and git-lfs OCI artifacts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Helper

type Helper struct {
	Target     oras.GraphTarget
	Tag        string
	FStore     *file.Store
	FStorePath string
}

Helper assists in pushing to or fetching from an OCI compliant registry.

func NewOCIHelper

func NewOCIHelper(tmpDir string, target oras.GraphTarget, tag string) (*Helper, error)

NewOCIHelper returns a ociHelper object used in pushing to or fetching from an OCI compliant registry. The OCI compliant registry must support the Referrer's API. This constructor initializes an oras filestore which is the caller's responsibility to close, may be done with sync.cleanup().

func (*Helper) CopyLFSFromOCI

func (o *Helper) CopyLFSFromOCI(ctx context.Context, objDest string, layerDesc ocispec.Descriptor) error

CopyLFSFromOCI copies a git-lfs file stored as an OCI layer, written to objDest.

TODO: This is inefficient and not a good interface. See issue https://git.act3-ace.com/ace/data/tool/-/issues/504.

Jump to

Keyboard shortcuts

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