Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) GetImageInfo(ctx context.Context, imageName string) (*ImageReference, error)
- func (c *Client) PullImage(ctx context.Context, imageName string) error
- func (c *Client) PushImage(ctx context.Context, imageName string) error
- func (c *Client) TagImage(ctx context.Context, source, target string) error
- func (c *Client) VerifyCredentials(ctx context.Context) error
- type ClientConfig
- type ClientInterface
- type ImageReference
- type SyncOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
DockerClient *client.Client
AuthConfig registry.AuthConfig
AuthStr string
Config ClientConfig
}
Client represents a Docker client with all necessary operations
func NewClient ¶
func NewClient(cfg ClientConfig) (*Client, error)
NewClient creates a new Docker client with the given configuration
func (*Client) GetImageInfo ¶
GetImageInfo retrieves information about a Docker image
type ClientConfig ¶
type ClientConfig struct {
Username string
Password string
Repository string
RetryCount int
RetryDelay time.Duration
PullTimeout time.Duration
PushTimeout time.Duration
APIVersion string
TLSVerify bool
CertPath string
}
ClientConfig holds configuration for a Docker client
func DefaultClientConfig ¶
func DefaultClientConfig() ClientConfig
DefaultClientConfig returns a default configuration for Docker clients
type ClientInterface ¶
type ClientInterface 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
GetImageInfo(ctx context.Context, imageName string) (*ImageReference, error)
Close() error
}
ClientInterface defines the interface for Docker operations
type ImageReference ¶
type ImageReference struct {
Registry string
Repository string
Name string
Tag string
Digest string
FullName string
}
ImageReference represents a Docker image reference
type SyncOperation ¶
type SyncOperation struct {
Source ImageReference
Target ImageReference
StartTime time.Time
EndTime time.Time
Status string
Error error
RetryCount int
BytesMoved int64
ChecksumOK bool
}
SyncOperation represents a sync operation between source and target images
Click to show internal directories.
Click to hide internal directories.