Documentation ¶
Index ¶
- func GetEncodedAuthForHost(host string) (string, error)
- type Client
- func (c Client) GetAllDigestsOnHost(ctx context.Context) ([]string, error)
- func (c Client) GetAllImagesOnHost(ctx context.Context) ([]string, error)
- func (c Client) GetTagsForRepository(ctx context.Context, host string, repository string) ([]string, error)
- func (c Client) ImageExistsAtRemote(ctx context.Context, image string) (bool, error)
- func (c Client) ImageExistsOnHost(ctx context.Context, image string) (bool, error)
- func (c Client) PullImageAndWait(ctx context.Context, image string, auth string) error
- func (c Client) PushImageAndWait(ctx context.Context, image string, auth string) error
- func (c Client) Tag(ctx context.Context, sourceImage string, targetImage string) error
- type RegistryPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEncodedAuthForHost ¶
GetEncodedAuthForHost returns a Base64 encoded auth for the given host.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages the communication with the Docker client.
func (Client) GetAllDigestsOnHost ¶
GetAllDigestsOnHost gets all of the images and their digests on the host.
func (Client) GetAllImagesOnHost ¶
GetAllImagesOnHost gets all of the images and their tags on the host.
func (Client) GetTagsForRepository ¶
func (c Client) GetTagsForRepository(ctx context.Context, host string, repository string) ([]string, error)
GetTagsForRepository returns all of the tags for a given repository.
func (Client) ImageExistsAtRemote ¶
ImageExistsAtRemote returns true if the image exists at the remote registry.
func (Client) ImageExistsOnHost ¶
ImageExistsOnHost returns true if the image exists on the host machine.
func (Client) PullImageAndWait ¶
PullImageAndWait pulls an image and waits for it to finish pulling. If an error occurs when pulling an image, the pull will be attempted again before failing.
func (Client) PushImageAndWait ¶
PushImageAndWait pushes an image and waits for it to finish pushing. If an error occurs when pushing an image, the push will be attempted again before failing.
type RegistryPath ¶
type RegistryPath string
RegistryPath is a registry path for a container image.
func (RegistryPath) Digest ¶
func (r RegistryPath) Digest() string
Digest returns the digest in the registry path.
func (RegistryPath) Host ¶
func (r RegistryPath) Host() string
Host returns the host in the registry path.
func (RegistryPath) Repository ¶
func (r RegistryPath) Repository() string
Repository is the repository in the registry path.
func (RegistryPath) Tag ¶
func (r RegistryPath) Tag() string
Tag returns the tag in the registry path.