Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RegistryClient ¶
type RegistryClient interface {
// WithSegment creates a new client with an additional scope path segment
// This method can be chained to build complex paths
WithSegment(segments ...string) RegistryClient
// GetRegistry returns the full registry path (host + scope)
GetRegistry() string
// GetDigest retrieves the digest for a specific image tag
// The repository is determined by the chained WithSegment() calls
GetDigest(ctx context.Context, tag string) (*v1.Hash, error)
// GetManifest retrieves the manifest for a specific image tag
// The repository is determined by the chained WithSegment() calls
GetManifest(ctx context.Context, tag string) ([]byte, error)
// 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
GetImage(ctx context.Context, tag string) (RegistryImage, error)
// GetImageConfig retrieves the image config file containing labels and metadata
// The repository is determined by the chained WithSegment() calls
GetImageConfig(ctx context.Context, tag string) (*v1.ConfigFile, error)
// ListTags retrieves all available tags for the current scope
// The repository is determined by the chained WithSegment() calls
ListTags(ctx context.Context) ([]string, error)
// ListRepositories retrieves all sub-repositories under the current scope
// The scope is determined by the chained WithSegment() calls
ListRepositories(ctx context.Context) ([]string, error)
// PushImage pushes an image to the registry at the specified tag
// The repository is determined by the chained WithSegment() calls
PushImage(ctx context.Context, tag string, img RegistryImage) error
}
RegistryClient defines the contract for interacting with container registries
type RegistryImage ¶ added in v0.21.1
type RegistryImage interface {
v1.Image
Extract() io.ReadCloser
}
Click to show internal directories.
Click to hide internal directories.