Documentation
¶
Index ¶
- Constants
- Variables
- func AddCachedTag(ctx context.Context, registry Interface, reference string)
- func ImplementationList() []string
- func Init(ctx context.Context, insecureRegistry, skipTlsVerifyRegistry bool, ...) error
- func IsAzureCrRepositoryNotFoundError(err error) bool
- func IsBrokenImageError(err error) bool
- func IsDockerHubRepositoryNotFoundError(err error) bool
- func IsDockerHubUnauthorizedError(err error) bool
- func IsGitHubPackagesForbiddenError(err error) bool
- func IsGitHubPackagesUnauthorizedError(err error) bool
- func IsHarborNotFoundError(err error) bool
- func IsHarborRepositoryNotFoundError(err error) bool
- func IsImageNotFoundError(err error) bool
- func IsQuayRepositoryNotFoundError(err error) bool
- func IsQuayTagExpiredErr(err error) bool
- func IsStatusForbiddenErr(err error) bool
- func IsStatusNotFoundErr(err error) bool
- func ResolveImplementation(repository, implementation string) (string, error)
- func ValidateRepositoryReference(reference string) error
- type ArchiveOpener
- type AzureCrRepositoryNotFoundError
- type CopyImageOptions
- type DockerHubRepositoryNotFoundError
- type DockerHubUnauthorizedError
- type DockerRegistryOptions
- type DockerRegistryTracer
- func (r *DockerRegistryTracer) CopyImage(ctx context.Context, sourceReference, destinationReference string, ...) (err error)
- func (r *DockerRegistryTracer) CreateRepo(ctx context.Context, reference string) (err error)
- func (r *DockerRegistryTracer) DeleteRepo(ctx context.Context, reference string) (err error)
- func (r *DockerRegistryTracer) DeleteRepoImage(ctx context.Context, repoImage *image.Info) (err error)
- func (r *DockerRegistryTracer) GetRepoImage(ctx context.Context, reference string) (res *image.Info, err error)
- func (r *DockerRegistryTracer) GetRepoImageConfigFile(ctx context.Context, reference string) (res *v1.ConfigFile, err error)
- func (r *DockerRegistryTracer) IsTagExist(ctx context.Context, reference string, opts ...Option) (res bool, err error)
- func (r *DockerRegistryTracer) MutateAndPushImage(ctx context.Context, sourceReference, destinationReference string, ...) (err error)
- func (r *DockerRegistryTracer) PullImageArchive(ctx context.Context, archiveWriter io.Writer, reference string) (err error)
- func (r *DockerRegistryTracer) PushImage(ctx context.Context, reference string, opts *PushImageOptions) (err error)
- func (r *DockerRegistryTracer) PushImageArchive(ctx context.Context, archiveOpener ArchiveOpener, reference string) (err error)
- func (r *DockerRegistryTracer) PushManifestList(ctx context.Context, reference string, opts ManifestListOptions) (err error)
- func (r *DockerRegistryTracer) String() (res string)
- func (r *DockerRegistryTracer) TagRepoImage(ctx context.Context, repoImage *image.Info, tag string) (err error)
- func (r *DockerRegistryTracer) Tags(ctx context.Context, reference string, opts ...Option) (res []string, err error)
- func (r *DockerRegistryTracer) TryGetRepoImage(ctx context.Context, reference string) (res *image.Info, err error)
- type DockerRegistryWithCache
- func (r *DockerRegistryWithCache) DeleteRepoImage(ctx context.Context, repoImage *image.Info) error
- func (r *DockerRegistryWithCache) IsTagExist(ctx context.Context, reference string, opts ...Option) (bool, error)
- func (r *DockerRegistryWithCache) MutateAndPushImage(ctx context.Context, sourceReference, destinationReference string, ...) error
- func (r *DockerRegistryWithCache) PushImage(ctx context.Context, reference string, opts *PushImageOptions) error
- func (r *DockerRegistryWithCache) TagRepoImage(ctx context.Context, repoImage *image.Info, tag string) error
- func (r *DockerRegistryWithCache) Tags(ctx context.Context, reference string, opts ...Option) ([]string, error)
- type GcrOptions
- type GenericApiInterface
- type GetRepoImageOptions
- type GitHubPackagesForbiddenError
- type GitHubPackagesUnauthorizedError
- type HarborRepositoryNotFoundError
- type Interface
- type ManifestListOptions
- type Option
- type Options
- type PushImageOptions
- type QuayRepositoryNotFoundError
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 ¶
View Source
var ( BrokenImageCodes = []transport.ErrorCode{ transport.BlobUnknownErrorCode, transport.BlobUploadInvalidErrorCode, transport.BlobUploadUnknownErrorCode, transport.DigestInvalidErrorCode, transport.ManifestBlobUnknownErrorCode, transport.ManifestInvalidErrorCode, transport.ManifestUnverifiedErrorCode, transport.NameInvalidErrorCode, } NotFoundImageCodes = []transport.ErrorCode{ transport.ManifestUnknownErrorCode, transport.NameUnknownErrorCode, } )
Functions ¶
func AddCachedTag ¶ added in v3.6.2
AddCachedTag records a tag published to the registry outside the registry client, so that the next cached tags lookup sees it. It only updates an already cached listing, never creates one, and never refreshes its freshness timestamp. A reference that is not a tagged one is ignored.
func ImplementationList ¶
func ImplementationList() []string
func IsBrokenImageError ¶
func IsHarborNotFoundError ¶
func IsImageNotFoundError ¶
func IsQuayTagExpiredErr ¶
func IsStatusForbiddenErr ¶
func IsStatusNotFoundErr ¶
func ResolveImplementation ¶
Types ¶
type ArchiveOpener ¶
type ArchiveOpener interface {
Open() (io.ReadCloser, error)
}
type AzureCrRepositoryNotFoundError ¶
type AzureCrRepositoryNotFoundError apiError
func NewAzureCrRepositoryNotFoundError ¶
func NewAzureCrRepositoryNotFoundError(err error) AzureCrRepositoryNotFoundError
type CopyImageOptions ¶
type CopyImageOptions struct{}
type DockerHubRepositoryNotFoundError ¶
type DockerHubRepositoryNotFoundError apiError
func NewDockerHubRepositoryNotFoundError ¶
func NewDockerHubRepositoryNotFoundError(err error) DockerHubRepositoryNotFoundError
type DockerHubUnauthorizedError ¶
type DockerHubUnauthorizedError apiError
func NewDockerHubUnauthorizedError ¶
func NewDockerHubUnauthorizedError(err error) DockerHubUnauthorizedError
type DockerRegistryOptions ¶
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 (*DockerRegistryTracer) GetRepoImage ¶
func (*DockerRegistryTracer) GetRepoImageConfigFile ¶
func (r *DockerRegistryTracer) GetRepoImageConfigFile(ctx context.Context, reference string) (res *v1.ConfigFile, err error)
func (*DockerRegistryTracer) IsTagExist ¶
func (*DockerRegistryTracer) MutateAndPushImage ¶
func (r *DockerRegistryTracer) MutateAndPushImage(ctx context.Context, sourceReference, destinationReference string, opts ...registry_api.MutateOption) (err error)
func (*DockerRegistryTracer) PullImageArchive ¶
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 (*DockerRegistryTracer) TryGetRepoImage ¶
type DockerRegistryWithCache ¶
type DockerRegistryWithCache struct {
Interface
// contains filtered or unexported fields
}
func (*DockerRegistryWithCache) DeleteRepoImage ¶
func (*DockerRegistryWithCache) IsTagExist ¶
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 ¶
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 ¶
type GitHubPackagesForbiddenError apiError
func NewGitHubPackagesForbiddenError ¶
func NewGitHubPackagesForbiddenError(err error) GitHubPackagesForbiddenError
type GitHubPackagesUnauthorizedError ¶
type GitHubPackagesUnauthorizedError apiError
func NewGitHubPackagesUnauthorizedError ¶
func NewGitHubPackagesUnauthorizedError(err error) GitHubPackagesUnauthorizedError
type HarborRepositoryNotFoundError ¶
type HarborRepositoryNotFoundError apiError
func NewHarborRepositoryNotFoundError ¶
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 ¶
type ManifestListOptions ¶
type Option ¶
type Option func(*Options)
func WithCachedTags ¶
func WithCachedTags() Option
func WithTagsMaxAge ¶ added in v3.6.1
WithTagsMaxAge allows serving the tags listing from the cache when it was fetched from the registry no longer than maxAge ago. A non-positive age requires a new request, without joining a listing that may have started before a publication lock was acquired.
type PushImageOptions ¶
type PushImageOptions struct {
Labels map[string]string
// ManifestFormat defaults to container_registry_extensions.ManifestFormatDocker.
ManifestFormat container_registry_extensions.ManifestFormat
}
type QuayRepositoryNotFoundError ¶
type QuayRepositoryNotFoundError apiError
func NewQuayRepositoryNotFoundError ¶
func NewQuayRepositoryNotFoundError(err error) QuayRepositoryNotFoundError
Source Files
¶
- api.go
- aws_ecr.go
- azure_cr.go
- bearer_cache.go
- common_api.go
- debug.go
- default.go
- docker_hub.go
- docker_hub_api.go
- docker_registry.go
- docker_registry_with_cache.go
- errors.go
- gcr.go
- generic_api.go
- github_packages.go
- github_packages_api.go
- gitlab_registry.go
- harbor.go
- harbor_api.go
- interface.go
- main.go
- options.go
- quay.go
- quay_api.go
- tags_page_size.go
- timing_docker_registry.go
Click to show internal directories.
Click to hide internal directories.