oci

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package oci implements a Gatherer for OCI registry sources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OCIGatherer

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

OCIGatherer gathers artifacts from OCI-compliant registries.

func NewOCIGatherer added in v1.1.6

func NewOCIGatherer(opts ...Option) *OCIGatherer

NewOCIGatherer creates an OCIGatherer with the given options.

func (*OCIGatherer) Gather

func (o *OCIGatherer) Gather(ctx context.Context, source, dst string) (meta metadata.Metadata, err error)

Gather pulls an OCI artifact from source into the dst directory.

func (*OCIGatherer) Matcher

func (o *OCIGatherer) Matcher(uri string) bool

Matcher returns true if the URI uses an OCI scheme or matches a known OCI registry.

type OCIMetadata

type OCIMetadata struct {
	Path      string
	Digest    string
	Timestamp string
}

OCIMetadata holds metadata about a gathered OCI artifact.

func (OCIMetadata) Get

func (o OCIMetadata) Get() interface{}

Get returns the OCIMetadata value.

func (OCIMetadata) GetDigest

func (o OCIMetadata) GetDigest() string

GetDigest returns the digest string of the pulled OCI artifact.

func (OCIMetadata) GetPinnedURL

func (o OCIMetadata) GetPinnedURL(u string) (string, error)

GetPinnedURL returns an oci:: URL pinned to the artifact digest.

type Option added in v1.1.6

type Option func(*OCIGatherer)

Option configures an OCIGatherer.

func WithTransport added in v1.1.6

func WithTransport(t http.RoundTripper) Option

WithTransport sets the http.RoundTripper used for OCI registry requests. Callers are responsible for wrapping the transport with retry if desired.

Jump to

Keyboard shortcuts

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