docker_registry

package
v2.67.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitHubPackagesImplementationName = "github"
	GitHubPackagesRegistryAddress    = "ghcr.io"
)
View Source
const AwsEcrImplementationName = "ecr"
View Source
const (
	AzureCrImplementationName = "acr"
)
View Source
const DefaultImplementationName = "default"
View Source
const DockerHubImplementationName = "dockerhub"
View Source
const GcrImplementationName = "gcr"
View Source
const GitLabRegistryImplementationName = "gitlab"
View Source
const (
	HarborImplementationName = "harbor"
)
View Source
const OptionCachedTagsDefault = false
View Source
const (
	QuayImplementationName = "quay"
)

Variables

Functions

func ImplementationList

func ImplementationList() []string

func Init

func Init(ctx context.Context, insecureRegistry, skipTlsVerifyRegistry bool, registryMirrors, insecureRegistryHosts []string) error

func IsAzureCrRepositoryNotFoundError added in v2.59.0

func IsAzureCrRepositoryNotFoundError(err error) bool

func IsBrokenImageError

func IsBrokenImageError(err error) bool

func IsDockerHubRepositoryNotFoundError added in v2.59.0

func IsDockerHubRepositoryNotFoundError(err error) bool

func IsDockerHubUnauthorizedError added in v2.59.0

func IsDockerHubUnauthorizedError(err error) bool

func IsGitHubPackagesForbiddenError added in v2.59.0

func IsGitHubPackagesForbiddenError(err error) bool

func IsGitHubPackagesUnauthorizedError added in v2.59.0

func IsGitHubPackagesUnauthorizedError(err error) bool

func IsHarborNotFoundError

func IsHarborNotFoundError(err error) bool

func IsHarborRepositoryNotFoundError added in v2.59.0

func IsHarborRepositoryNotFoundError(err error) bool

func IsImageNotFoundError

func IsImageNotFoundError(err error) bool

func IsQuayRepositoryNotFoundError added in v2.59.0

func IsQuayRepositoryNotFoundError(err error) bool

func IsQuayTagExpiredErr

func IsQuayTagExpiredErr(err error) bool

func IsStatusForbiddenErr added in v2.58.0

func IsStatusForbiddenErr(err error) bool

func IsStatusNotFoundErr

func IsStatusNotFoundErr(err error) bool

func ResolveImplementation

func ResolveImplementation(repository, implementation string) (string, error)

func ValidateRepositoryReference

func ValidateRepositoryReference(reference string) error

Types

type ArchiveOpener

type ArchiveOpener interface {
	Open() (io.ReadCloser, error)
}

type AzureCrRepositoryNotFoundError added in v2.59.0

type AzureCrRepositoryNotFoundError apiError

func NewAzureCrRepositoryNotFoundError added in v2.59.0

func NewAzureCrRepositoryNotFoundError(err error) AzureCrRepositoryNotFoundError

type CopyImageOptions

type CopyImageOptions struct{}

type DockerHubRepositoryNotFoundError added in v2.59.0

type DockerHubRepositoryNotFoundError apiError

func NewDockerHubRepositoryNotFoundError added in v2.59.0

func NewDockerHubRepositoryNotFoundError(err error) DockerHubRepositoryNotFoundError

type DockerHubUnauthorizedError added in v2.59.0

type DockerHubUnauthorizedError apiError

func NewDockerHubUnauthorizedError added in v2.59.0

func NewDockerHubUnauthorizedError(err error) DockerHubUnauthorizedError

type DockerRegistryOptions

type DockerRegistryOptions struct {
	InsecureRegistry      bool
	SkipTlsVerifyRegistry bool
	InsecureRegistryHosts []string
	DockerHubToken        string
	DockerHubUsername     string
	DockerHubPassword     string
	GitHubToken           string
	HarborUsername        string
	HarborPassword        string
	QuayToken             string
}

type DockerRegistryTracer

type DockerRegistryTracer struct {
	DockerRegistry    Interface
	DockerRegistryApi GenericApiInterface
}

func NewDockerRegistryTracer

func NewDockerRegistryTracer(dockerRegistry Interface, dockerRegistryApi GenericApiInterface) *DockerRegistryTracer

func (*DockerRegistryTracer) CopyImage

func (r *DockerRegistryTracer) CopyImage(ctx context.Context, sourceReference, destinationReference string, opts CopyImageOptions) (err error)

func (*DockerRegistryTracer) CreateRepo

func (r *DockerRegistryTracer) CreateRepo(ctx context.Context, reference string) (err error)

func (*DockerRegistryTracer) DeleteRepo

func (r *DockerRegistryTracer) DeleteRepo(ctx context.Context, reference string) (err error)

func (*DockerRegistryTracer) DeleteRepoImage

func (r *DockerRegistryTracer) DeleteRepoImage(ctx context.Context, repoImage *image.Info) (err error)

func (*DockerRegistryTracer) GetRepoImage

func (r *DockerRegistryTracer) GetRepoImage(ctx context.Context, reference string) (res *image.Info, err error)

func (*DockerRegistryTracer) GetRepoImageConfigFile

func (r *DockerRegistryTracer) GetRepoImageConfigFile(ctx context.Context, reference string) (res *v1.ConfigFile, err error)

func (*DockerRegistryTracer) IsTagExist

func (r *DockerRegistryTracer) IsTagExist(ctx context.Context, reference string, opts ...Option) (res bool, err error)

func (*DockerRegistryTracer) MutateAndPushImage

func (r *DockerRegistryTracer) MutateAndPushImage(ctx context.Context, sourceReference, destinationReference string, opts ...registry_api.MutateOption) (err error)

func (*DockerRegistryTracer) PullImageArchive

func (r *DockerRegistryTracer) PullImageArchive(ctx context.Context, archiveWriter io.Writer, reference string) (err error)

func (*DockerRegistryTracer) PushImage

func (r *DockerRegistryTracer) PushImage(ctx context.Context, reference string, opts *PushImageOptions) (err error)

func (*DockerRegistryTracer) PushImageArchive

func (r *DockerRegistryTracer) PushImageArchive(ctx context.Context, archiveOpener ArchiveOpener, reference string) (err error)

func (*DockerRegistryTracer) PushManifestList

func (r *DockerRegistryTracer) PushManifestList(ctx context.Context, reference string, opts ManifestListOptions) (err error)

func (*DockerRegistryTracer) String

func (r *DockerRegistryTracer) String() (res string)

func (*DockerRegistryTracer) TagRepoImage

func (r *DockerRegistryTracer) TagRepoImage(ctx context.Context, repoImage *image.Info, tag string) (err error)

func (*DockerRegistryTracer) Tags

func (r *DockerRegistryTracer) Tags(ctx context.Context, reference string, opts ...Option) (res []string, err error)

func (*DockerRegistryTracer) TryGetRepoImage

func (r *DockerRegistryTracer) TryGetRepoImage(ctx context.Context, reference string) (res *image.Info, err error)

type DockerRegistryWithCache

type DockerRegistryWithCache struct {
	Interface
	// contains filtered or unexported fields
}

func (*DockerRegistryWithCache) DeleteRepoImage

func (r *DockerRegistryWithCache) DeleteRepoImage(ctx context.Context, repoImage *image.Info) error

func (*DockerRegistryWithCache) IsTagExist

func (r *DockerRegistryWithCache) IsTagExist(ctx context.Context, reference string, opts ...Option) (bool, error)

func (*DockerRegistryWithCache) MutateAndPushImage

func (r *DockerRegistryWithCache) MutateAndPushImage(ctx context.Context, sourceReference, destinationReference string, opts ...registry_api.MutateOption) error

func (*DockerRegistryWithCache) PushImage

func (r *DockerRegistryWithCache) PushImage(ctx context.Context, reference string, opts *PushImageOptions) error

func (*DockerRegistryWithCache) TagRepoImage

func (r *DockerRegistryWithCache) TagRepoImage(ctx context.Context, repoImage *image.Info, tag string) error

func (*DockerRegistryWithCache) Tags

func (r *DockerRegistryWithCache) Tags(ctx context.Context, reference string, opts ...Option) ([]string, error)

type GcrOptions

type GcrOptions struct {
	// contains filtered or unexported fields
}

type GenericApiInterface

type GenericApiInterface interface {
	GetRepoImageConfigFile(ctx context.Context, reference string) (*v1.ConfigFile, error)
	// contains filtered or unexported methods
}

func API

func API() GenericApiInterface

type GetRepoImageOptions

type GetRepoImageOptions struct {
	IsImageIndex bool
}

type GitHubPackagesForbiddenError added in v2.59.0

type GitHubPackagesForbiddenError apiError

func NewGitHubPackagesForbiddenError added in v2.59.0

func NewGitHubPackagesForbiddenError(err error) GitHubPackagesForbiddenError

type GitHubPackagesUnauthorizedError added in v2.59.0

type GitHubPackagesUnauthorizedError apiError

func NewGitHubPackagesUnauthorizedError added in v2.59.0

func NewGitHubPackagesUnauthorizedError(err error) GitHubPackagesUnauthorizedError

type HarborRepositoryNotFoundError added in v2.59.0

type HarborRepositoryNotFoundError apiError

func NewHarborRepositoryNotFoundError added in v2.59.0

func NewHarborRepositoryNotFoundError(err error) HarborRepositoryNotFoundError

type Interface

type Interface interface {
	CreateRepo(ctx context.Context, reference string) error
	DeleteRepo(ctx context.Context, reference string) error
	Tags(ctx context.Context, reference string, opts ...Option) ([]string, error)
	IsTagExist(ctx context.Context, reference string, opts ...Option) (bool, error)
	TagRepoImage(ctx context.Context, repoImage *image.Info, tag string) error
	TryGetRepoImage(ctx context.Context, reference string) (*image.Info, error)
	DeleteRepoImage(ctx context.Context, repoImage *image.Info) error
	PushImage(ctx context.Context, reference string, opts *PushImageOptions) error
	CopyImage(ctx context.Context, sourceReference, destinationReference string, opts CopyImageOptions) error

	PushImageArchive(ctx context.Context, archiveOpener ArchiveOpener, reference string) error
	PullImageArchive(ctx context.Context, archiveWriter io.Writer, reference string) error
	PushManifestList(ctx context.Context, reference string, opts ManifestListOptions) error

	String() string
	// contains filtered or unexported methods
}

func NewDockerRegistry

func NewDockerRegistry(ctx context.Context, repositoryAddress, implementation string, options DockerRegistryOptions) (Interface, error)

type ManifestListOptions

type ManifestListOptions struct {
	Manifests []*image.Info
	Platforms []string
}

type Option

type Option func(*Options)

func WithCachedTags

func WithCachedTags() Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

type PushImageOptions

type PushImageOptions struct {
	Labels map[string]string
}

type QuayRepositoryNotFoundError added in v2.59.0

type QuayRepositoryNotFoundError apiError

func NewQuayRepositoryNotFoundError added in v2.59.0

func NewQuayRepositoryNotFoundError(err error) QuayRepositoryNotFoundError

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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