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 ¶
OCIMetadata holds metadata about a gathered OCI artifact.
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.