oci

package
v1.20.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 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 added in v1.19.0

func HasDigest(imageName string) bool

HasDigest returns whether the provided image name contains a digest.

func PullImage added in v1.15.1

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

PullImage pulls image from source using provided options for auth credentials

Types

type CredentialAuthenticator added in v1.20.1

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 added in v1.20.1

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

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

type Fetcher added in v1.20.1

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 added in v1.20.1

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