Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) CheckImageExists(ctx context.Context, tag string) error
- func (c *Client) GetDigest(ctx context.Context, tag string) (*v1.Hash, error)
- func (c *Client) GetImage(ctx context.Context, tag string) (pkg.RegistryImage, error)
- func (c *Client) GetImageConfig(ctx context.Context, tag string) (*v1.ConfigFile, error)
- func (c *Client) GetManifest(ctx context.Context, tag string) ([]byte, error)
- func (c *Client) GetRegistry() string
- func (c *Client) ListRepositories(ctx context.Context) ([]string, error)
- func (c *Client) ListTags(ctx context.Context) ([]string, error)
- func (c *Client) PushImage(ctx context.Context, tag string, img pkg.RegistryImage) error
- func (c *Client) WithSegment(segments ...string) pkg.RegistryClient
- type ClientOptions
- type Image
Constants ¶
This section is empty.
Variables ¶
var ErrImageNotFound = errors.New("image not found")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods to interact with container registries
func NewClientWithOptions ¶
func NewClientWithOptions(registry string, opts *ClientOptions) *Client
NewClientWithOptions creates a new container registry client with advanced options
func (*Client) CheckImageExists ¶ added in v0.21.3
CheckImageExists checks if a specific image exists in the registry If image not found, return an error The repository is determined by the chained WithSegment() calls
func (*Client) GetDigest ¶ added in v0.20.13
The repository is determined by the chained WithSegment() calls
func (*Client) GetImage ¶
GetImage retrieves an remote image for a specific reference Do not return remote image to avoid drop connection with context cancelation. It will be in use while passed context will be alive. The repository is determined by the chained WithSegment() calls
func (*Client) GetImageConfig ¶
GetImageConfig retrieves the image config file containing labels and metadata The repository is determined by the chained WithSegment() calls
func (*Client) GetManifest ¶
GetManifest retrieves the manifest for a specific image tag The repository is determined by the chained WithSegment() calls
func (*Client) GetRegistry ¶
GetRegistry returns the full registry path (host + scope)
func (*Client) ListRepositories ¶
ListRepositories lists all sub-repositories under the current scope The scope is determined by the chained WithSegment() calls Returns repository names (tags) under the current scope
func (*Client) ListTags ¶
ListTags lists all tags for the current scope The repository is determined by the chained WithSegment() calls
func (*Client) PushImage ¶ added in v0.20.12
PushImage pushes an image to the registry at the specified tag The repository is determined by the chained WithSegment() calls
func (*Client) WithSegment ¶ added in v0.21.2
func (c *Client) WithSegment(segments ...string) pkg.RegistryClient
WithSegment creates a new client with an additional scope path segment This method can be chained to build complex paths: client.WithSegment("deckhouse").WithSegment("ee").WithSegment("modules")
type ClientOptions ¶
type ClientOptions struct {
// Auth provides authentication for registry access (takes precedence over Username/Password/LicenseToken)
Auth authn.Authenticator
// Username for basic authentication
Username string
// Password for basic authentication
Password string
// LicenseToken for Deckhouse license authentication (alternative to Username/Password)
LicenseToken string
// Insecure allows connecting to registries over HTTP instead of HTTPS
Insecure bool
// TLSSkipVerify skips TLS certificate verification
TLSSkipVerify bool
// Logger for client operations
Logger *log.Logger
}
ClientOptions contains configuration options for the registry client