Documentation
¶
Index ¶
- type Client
- func (c *Client) ExtractImageLayers(ctx context.Context, tag string, handler func(pkg.LayerStream) error) 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) (*remote.Descriptor, 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) 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(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 The caller is responsible for closing each LayerStream.Reader
func (*Client) GetImage ¶
GetImage retrieves an image for a specific reference 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 image metadata 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
type ClientOptions ¶
type ClientOptions struct { // RegistryHost is the registry hostname only (e.g., "registry.example.com") RegistryHost string // 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