Documentation
¶
Index ¶
- func GetDockerHubRepoTags(ctx context.Context, repo string) ([]string, error)
- type Client
- func (c *Client) Close(_ context.Context) error
- func (c *Client) GetAuthToken() string
- func (c *Client) GetDockerClient() *docker.Client
- func (c *Client) Images() ImageClient
- func (c *Client) Login(ctx context.Context, auth registry.AuthConfig) error
- func (c *Client) LoginBasic(ctx context.Context, username, password string) error
- func (c *Client) LoginFromEnv(ctx context.Context) error
- func (c *Client) Logout(ctx context.Context) error
- type ErrorDetail
- type ErrorLine
- type ImageClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDockerHubRepoTags ¶
GetDockerHubRepoTags returns all tags for the given docker hub repository. The resulting list gets sorted in ascending order. Currently, the default behavior is to only return tags that match the pattern \d+\.\d+.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the main docker client. It is used to create other clients.
func (*Client) GetAuthToken ¶
func (*Client) GetDockerClient ¶
func (*Client) Images ¶
func (c *Client) Images() ImageClient
func (*Client) Login ¶
Login logs in to the docker registry using the given auth config. It uses the docker CLI to login.
func (*Client) LoginBasic ¶
LoginBasic logs in to the docker registry using the given username and password. It calls the Login method internally.
func (*Client) LoginFromEnv ¶
LoginFromEnv logs in to the docker registry using the environment variables DOCKER_USERNAME and DOCKER_PASSWORD. It calls the LoginBasic method internally.
type ErrorDetail ¶
type ErrorDetail struct {
Message string `json:"message"`
}
type ErrorLine ¶
type ErrorLine struct { Error string `json:"error"` ErrorDetail ErrorDetail `json:"errorDetail"` }
type ImageClient ¶
type ImageClient interface { Build(ctx context.Context, dockerfile string, tags ...string) (string, string, error) Push(ctx context.Context, images ...string) error Remove(ctx context.Context, ids ...string) error }
ImageClient is a client for docker images. It is used to build, tag, push and remove docker images.