Help us shape the future of Go! Take the 2026 Go Developer Survey

oci

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NoFurtherSyncsLog is the log message for when no further syncs will occur.
	// exported as a const for use in testing.
	NoFurtherSyncsLog = "Image has been synced, and no further syncs will occur"
)

Variables

This section is empty.

Functions

func HasDigest

func HasDigest(imageName string) bool

HasDigest returns whether the provided image name contains a digest.

func PullImage

func PullImage(imageName string, options ...remote.Option) (v1.Image, error)

PullImage pulls image from source using provided options for auth credentials

Types

type CredentialAuthenticator

type CredentialAuthenticator struct {
	// CredentialProvider provides credentials that are used to fetch auth tokens.
	CredentialProvider auth.CredentialProvider
}

CredentialAuthenticator wraps a CredentialProvider to generate AuthConfigs used by the container registry client.

Neither the credentials or token are cached by this wrapper. Inject the CachingCredentialProvider to add caching.

func (*CredentialAuthenticator) Authorization

func (a *CredentialAuthenticator) Authorization() (*authn.AuthConfig, error)

Authorization returns the value to use in an http transport's Authorization header.

type Fetcher

type Fetcher struct {
	// Authenticator is used to authenticate with the OCI repository.
	Authenticator authn.Authenticator
}

Fetcher fetches package images from an OCI repository using the specified authenticator.

func (*Fetcher) FetchPackage

func (f *Fetcher) FetchPackage(ctx context.Context, imageName, ociRoot, rev string) error

FetchPackage fetches the package from the OCI repository and write it to the destination.

Jump to

Keyboard shortcuts

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