Documentation
¶
Index ¶
- type DockerClient
- func (d *DockerClient) Close() error
- func (d *DockerClient) PullImage(ctx context.Context, imageName string) error
- func (d *DockerClient) PushImage(ctx context.Context, imageName string) error
- func (d *DockerClient) TagImage(ctx context.Context, source, target string) error
- func (d *DockerClient) VerifyCredentials(ctx context.Context) error
- type DockerClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerClient ¶
type DockerClient struct {
Client *client.Client
AuthStr string
Username string
Password string
Repository string
RetryCount int
RetryDelay time.Duration
}
DockerClient encapsulates Docker operations with enhanced error handling and retry logic
func NewDockerClient ¶
func NewDockerClient(username, password, repository string) (*DockerClient, error)
NewDockerClient creates a new Docker client with authentication
func (*DockerClient) PullImage ¶
func (d *DockerClient) PullImage(ctx context.Context, imageName string) error
PullImage pulls a Docker image with retry logic
func (*DockerClient) PushImage ¶
func (d *DockerClient) PushImage(ctx context.Context, imageName string) error
PushImage pushes a Docker image with retry logic
func (*DockerClient) TagImage ¶
func (d *DockerClient) TagImage(ctx context.Context, source, target string) error
TagImage tags a Docker image
func (*DockerClient) VerifyCredentials ¶
func (d *DockerClient) VerifyCredentials(ctx context.Context) error
VerifyCredentials verifies Docker registry credentials
type DockerClientInterface ¶
type DockerClientInterface interface {
PullImage(ctx context.Context, imageName string) error
TagImage(ctx context.Context, source, target string) error
PushImage(ctx context.Context, imageName string) error
VerifyCredentials(ctx context.Context) error
Close() error
}
DockerClientInterface defines the interface for Docker operations
Click to show internal directories.
Click to hide internal directories.