Help us shape the future of Go! Take the 2026 Go Developer Survey

pkg

package
v0.33.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicService added in v0.22.1

type BasicService interface {
	GetImage(ctx context.Context, tag string, opts ...registry.ImageGetOption) (RegistryImage, error)
	GetDigest(ctx context.Context, tag string) (*v1.Hash, error)
	CheckImageExists(ctx context.Context, tag string) error
	ListTags(ctx context.Context) ([]string, error)
}

BasicService defines common registry operations with standardized logging

type ClientImage added in v0.22.1

type ClientImage interface {
	v1.Image
	Extract() io.ReadCloser
}

type Edition added in v0.29.0

type Edition string
const (
	EEEdition     Edition = "ee"
	FEEdition     Edition = "fe"
	SEEdition     Edition = "se"
	BEEdition     Edition = "be"
	SEPlusEdition Edition = "se-plus"
	CEEdition     Edition = "ce"
	NoEdition     Edition = ""
)

func (Edition) IsValid added in v0.29.0

func (e Edition) IsValid() bool

func (Edition) String added in v0.29.0

func (e Edition) String() string

type ImageGetOption added in v0.22.1

type ImageGetOption interface {
	// ApplyToImageGet applies this configuration to the given image get options.
	ApplyToImageGet(*ImageGetOptions)
}

ImageGetOption is some configuration that modifies options for a get request.

type ImageGetOptions added in v0.22.1

type ImageGetOptions struct {
	ProgressBar *progress.DownloadBar
	Platform    *v1.Platform
}

type ImageMeta added in v0.22.1

type ImageMeta interface {
	GetTagReference() string
	GetDigestReference() string
	GetDigest() *v1.Hash
}

type ImagePutOption added in v0.22.9

type ImagePutOption interface {
	// ApplyToImagePut applies this configuration to the given image put options.
	ApplyToImagePut(*ImagePutOptions)
}

ImagePutOption is some configuration that modifies options for a put request.

type ImagePutOptions added in v0.22.9

type ImagePutOptions struct {
	ProgressBar *progress.UploadBar
}

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)

	// 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)

	// 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
	CheckImageExists(ctx context.Context, tag string) 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, opts ...ImageGetOption) (ClientImage, 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 v1.Image, opts ...ImagePutOption) 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)
}

RegistryClient defines the contract for interacting with container registries

type RegistryImage added in v0.21.1

type RegistryImage interface {
	v1.Image
	Extract() io.ReadCloser
	GetMetadata() (ImageMeta, error)
	SetMetadata(metadata ImageMeta)
}

Directories

Path Synopsis
Package diagnostic provides HelpfulError - a wrapper around standard Go errors that adds possible causes and actionable solutions for the user.
Package diagnostic provides HelpfulError - a wrapper around standard Go errors that adds possible causes and actionable solutions for the user.
libmirror
libsaferequest
registry

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL