registry

package
v0.33.16 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 12 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. Non-auth options such as WithInsecure are dropped here: a caller that needs them must consume RemoteOptions and NameOptions instead.

func Copy

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

Copy copies a container image from srcRef to destRef. By default it authenticates with the ambient Docker keychain; opts can override credentials and transport.

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 NameOptions added in v0.33.16

func NameOptions(opts ...Option) []name.Option

NameOptions resolves opts into the options of reference and repository parsing.

func PushPackageIndex

func PushPackageIndex(ctx context.Context, repository string, opts ...Option) 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 RemoteOptions added in v0.33.16

func RemoteOptions(ctx context.Context, opts ...Option) []remote.Option

RemoteOptions resolves opts into the options of a remote request bound to ctx.

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 a registry request: authentication, transport security and the URL scheme of reference parsing.

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.

func WithInsecure added in v0.33.16

func WithInsecure() Option

WithInsecure talks to the registry over plain HTTP and skips TLS certificate verification. Use only when the user explicitly opts in.

Jump to

Keyboard shortcuts

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