Documentation
¶
Index ¶
- type Client
- func (c *Client) ExtractImageLayers(ctx context.Context, tag string, handler func(pkg.LayerStream) error) error
- func (c *Client) GetDigest(ctx context.Context, tag string) (*v1.Hash, error)
- func (c *Client) GetImage(ctx context.Context, tag string) (v1.Image, error)
- func (c *Client) GetImageConfig(ctx context.Context, tag string) (*v1.ConfigFile, error)
- func (c *Client) GetImageLayers(ctx context.Context, tag string) ([]v1.Layer, error)
- func (c *Client) GetLabel(ctx context.Context, tag, labelKey string) (string, bool, 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 v1.Image) error
- func (c *Client) WithScope(scope string) pkg.RegistryClient
- type ClientOptions
- type LayerStream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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) ExtractImageLayers ¶
func (c *Client) ExtractImageLayers(ctx context.Context, tag string, handler func(pkg.LayerStream) error) error
ExtractImageLayers retrieves uncompressed layer streams for extraction The repository is determined by the chained WithScope() calls
func (*Client) GetDigest ¶ added in v0.20.13
The repository is determined by the chained WithScope() 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 WithScope() calls
func (*Client) GetImageConfig ¶
GetImageConfig retrieves the image config file containing labels and metadata The repository is determined by the chained WithScope() calls
func (*Client) GetImageLayers ¶
GetImageLayers retrieves all layers of an image The repository is determined by the chained WithScope() calls
func (*Client) GetLabel ¶
GetLabel retrieves a specific label from remote image metadata If you want to get several labels, consider using GetImageConfig to reduce API calls The repository is determined by the chained WithScope() calls
func (*Client) GetManifest ¶
GetManifest retrieves the manifest for a specific image tag The repository is determined by the chained WithScope() 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 WithScope() 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 WithScope() calls
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
type LayerStream ¶
type LayerStream struct {
// contains filtered or unexported fields
}
LayerStream represents a single layer stream for extraction
func NewLayerStream ¶
func NewLayerStream(index, total int, reader io.ReadCloser) *LayerStream
NewLayerStream creates a new LayerStream
func (*LayerStream) GetIndex ¶
func (ls *LayerStream) GetIndex() int
GetIndex returns the current layer index (1-based)
func (*LayerStream) GetReader ¶
func (ls *LayerStream) GetReader() io.ReadCloser
GetReader returns the reader for the layer content
func (*LayerStream) GetTotal ¶
func (ls *LayerStream) GetTotal() int
GetTotal returns the total number of layers