Documentation
¶
Index ¶
- type Client
- func (c Client) GetAllDigestsOnHost(ctx context.Context) ([]string, error)
- func (c Client) GetAllImagesOnHost(ctx context.Context) ([]string, error)
- func (c Client) GetTagsForRepo(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
- type ErrorMessage
- type ProgressDetail
- type RegistryPath
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a Docker client with a logger
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) GetTagsForRepo ¶
func (c Client) GetTagsForRepo(ctx context.Context, host string, repository string) ([]string, error)
GetTagsForRepo 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
type ErrorMessage ¶
type ErrorMessage struct {
Error string `json:"error"`
}
ErrorMessage is an error message from the Docker client
type ProgressDetail ¶
ProgressDetail is the current state of pushing or pulling an image (in Bytes)
type RegistryPath ¶
type RegistryPath string
RegistryPath is a registry path for a docker image
func (RegistryPath) Digest ¶
func (r RegistryPath) Digest() string
Digest is the digest in the registry path, if one exists
func (RegistryPath) Host ¶
func (r RegistryPath) Host() string
Host is 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 is the tag in the registry path, if one exists
type Status ¶
type Status struct {
Message string `json:"status"`
ID string `json:"id"`
ProgressDetail ProgressDetail `json:"progressDetail"`
}
Status is the status output from the Docker client
func (Status) GetMessage ¶
GetMessage returns a human friendly message from parsing the status message