Documentation
¶
Index ¶
- func Auth(opts ...Option) remote.Option
- func Copy(ctx context.Context, srcRef, destRef string, opts ...Option) error
- func Exists(ctx context.Context, ref string, opts ...Option) error
- func NameOptions(opts ...Option) []name.Option
- func PushPackageIndex(ctx context.Context, repository string, opts ...Option) error
- func RemoteOptions(ctx context.Context, opts ...Option) []remote.Option
- func Tags(ctx context.Context, repository string, opts ...Option) ([]string, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
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 ¶
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 NameOptions ¶ added in v0.33.16
NameOptions resolves opts into the options of reference and repository parsing.
func PushPackageIndex ¶
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
RemoteOptions resolves opts into the options of a remote request bound to ctx.
Types ¶
type Option ¶
type Option func(*options)
Option customizes a registry request: authentication, transport security and the URL scheme of reference parsing.
func WithBasicAuth ¶
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.