oci

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar+gzip"
	MediaTypeConfig     = "application/vnd.oci.image.config.v1+json"
)

Variables

This section is empty.

Functions

func CopyPolicy

func CopyPolicy(
	ctx context.Context,
	log *zerolog.Logger,
	sourceRef, sourceUser, sourcePassword, destinationRef, destinationUser, destinationPassword, ociStore string,
) error

func IsAllowedMediaType

func IsAllowedMediaType(mediaType string) bool

func RemoveBlob

func RemoveBlob(ref *ocispec.Descriptor, path string) error

Types

type Oci

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

func NewOCI

func NewOCI(ctx context.Context, log *zerolog.Logger, hostsFunc docker.RegistryHosts, policyRoot string) (*Oci, error)

func (*Oci) GetManifest

func (o *Oci) GetManifest(descriptor *ocispec.Descriptor) (*ocispec.Manifest, error)

func (*Oci) GetStore

func (o *Oci) GetStore() *oci.Store

func (*Oci) GetTarballAndConfigLayerDescriptor

func (o *Oci) GetTarballAndConfigLayerDescriptor(
	ctx context.Context,
	descriptor *ocispec.Descriptor,
) (
	*ocispec.Descriptor,
	*ocispec.Descriptor,
	error,
)

func (*Oci) ListReferences

func (o *Oci) ListReferences() (map[string]ocispec.Descriptor, error)

func (*Oci) Pull

func (o *Oci) Pull(ref string) (digest.Digest, error)

func (*Oci) Push

func (o *Oci) Push(ref string) (digest.Digest, error)

func (*Oci) Tag

func (o *Oci) Tag(existingRef, newRef string) error

func (*Oci) Untag

func (o *Oci) Untag(descr *ocispec.Descriptor, ref string) error

func (*Oci) WithDockerRegistryHosts

func (o *Oci) WithDockerRegistryHosts(transport *http.Transport, user, pat string) *Oci

Jump to

Keyboard shortcuts

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