package client
import "github.com/docker/cli/cli/registry/client"
Index ¶
- func GetRegistryAuth(ctx context.Context, resolver AuthConfigResolver, imageName string) (*types.AuthConfig, error)
- func IsNotFound(err error) bool
- func RepoNameForReference(ref reference.Named) (string, error)
- type AuthConfigResolver
- type ErrBlobCreated
- type ErrHTTPProto
- type PutManifestOptions
- type RegistryClient
Functions ¶
func GetRegistryAuth ¶
func GetRegistryAuth(ctx context.Context, resolver AuthConfigResolver, imageName string) (*types.AuthConfig, error)
GetRegistryAuth returns the auth config given an input image
func IsNotFound ¶
IsNotFound returns true if the error is a not found error
func RepoNameForReference ¶
RepoNameForReference returns the repository name from a reference
Types ¶
type AuthConfigResolver ¶
type AuthConfigResolver func(ctx context.Context, index *registrytypes.IndexInfo) types.AuthConfig
AuthConfigResolver returns Auth Configuration for an index
type ErrBlobCreated ¶
ErrBlobCreated returned when a blob mount request was created
func (ErrBlobCreated) Error ¶
func (err ErrBlobCreated) Error() string
type ErrHTTPProto ¶
type ErrHTTPProto struct { OrigErr string }
ErrHTTPProto returned if attempting to use TLS with a non-TLS registry
func (ErrHTTPProto) Error ¶
func (err ErrHTTPProto) Error() string
type PutManifestOptions ¶
PutManifestOptions is the data sent to push a manifest
type RegistryClient ¶
type RegistryClient interface { GetManifest(ctx context.Context, ref reference.Named) (manifesttypes.ImageManifest, error) GetManifestList(ctx context.Context, ref reference.Named) ([]manifesttypes.ImageManifest, error) MountBlob(ctx context.Context, source reference.Canonical, target reference.Named) error PutManifest(ctx context.Context, ref reference.Named, manifest distribution.Manifest) (digest.Digest, error) GetTags(ctx context.Context, ref reference.Named) ([]string, error) }
RegistryClient is a client used to communicate with a Docker distribution registry
func NewRegistryClient ¶
func NewRegistryClient(resolver AuthConfigResolver, userAgent string, insecure bool) RegistryClient
NewRegistryClient returns a new RegistryClient with a resolver
Source Files ¶
client.go endpoint.go fetcher.go
- Version
- v20.10.5+incompatible
- Published
- Mar 2, 2021
- Platform
- linux/amd64
- Imports
- 25 packages
- Last checked
- 14 minutes ago –
Tools for package owners.