registry

package
v0.33.5 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(opts ...Option) remote.Option

Auth resolves opts into the authentication option for a remote request, defaulting to the ambient Docker keychain. It is exported for packages that issue their own registry requests instead of going through this one, such as imagefs.

func Copy

func Copy(ctx context.Context, srcRef, destRef string) error

Copy copies a container image from srcRef to destRef using credentials from the default keychain.

func Exists

func Exists(ctx context.Context, ref string, opts ...Option) error

Exists verifies that ref exists by performing a HEAD request for its manifest.

func PushPackageIndex

func PushPackageIndex(ctx context.Context, repository string) error

PushPackageIndex creates an empty package index marker image for repository. It extracts the package name from the registry path (e.g., "registry.io/org/pkg" -> "pkg") and pushes an empty image tagged as "registry.io/org:pkg".

func Tags

func Tags(ctx context.Context, repository string, opts ...Option) ([]string, error)

Tags lists the tags of repository, which is a repository path without a tag. An empty result means the repository exists but carries no tags.

Types

type Option

type Option func(*options)

Option customizes how a registry request authenticates.

func WithBasicAuth

func WithBasicAuth(username, password string) Option

WithBasicAuth authenticates requests with username and password instead of the ambient Docker keychain. An empty username or password leaves the keychain in place, so a partially configured caller keeps working rather than losing its credentials.

Jump to

Keyboard shortcuts

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