docker_registry

package
v1.2.234 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 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"
)
View Source
const SelectelImplementationName = "selectel"

Variables

Functions

func API

func API() *genericApi

func ImplementationList

func ImplementationList() []string

func Init

func Init(ctx context.Context, insecureRegistry, skipTlsVerifyRegistry bool) error

func IsAzureCrRepositoryNotFoundErr added in v1.2.14

func IsAzureCrRepositoryNotFoundErr(err error) bool

func IsBrokenImageError added in v1.2.232

func IsBrokenImageError(err error) bool

func IsDockerHubRepositoryNotFoundErr added in v1.2.14

func IsDockerHubRepositoryNotFoundErr(err error) bool

func IsDockerHubUnauthorizedErr added in v1.2.14

func IsDockerHubUnauthorizedErr(err error) bool

func IsGitHubPackagesForbiddenErr added in v1.2.14

func IsGitHubPackagesForbiddenErr(err error) bool

func IsGitHubPackagesUnauthorizedErr added in v1.2.14

func IsGitHubPackagesUnauthorizedErr(err error) bool

func IsHarborNotFoundError added in v1.2.52

func IsHarborNotFoundError(err error) bool

func IsHarborRepositoryNotFoundErr added in v1.2.14

func IsHarborRepositoryNotFoundErr(err error) bool

func IsImageNotFoundError added in v1.2.232

func IsImageNotFoundError(err error) bool

func IsQuayRepositoryNotFoundErr added in v1.2.14

func IsQuayRepositoryNotFoundErr(err error) bool

func IsQuayTagExpiredErr added in v1.2.59

func IsQuayTagExpiredErr(err error) bool

func IsSelectelRepositoryNotFoundErr added in v1.2.148

func IsSelectelRepositoryNotFoundErr(err error) bool

func IsSelectelUnauthorizedErr added in v1.2.148

func IsSelectelUnauthorizedErr(err error) bool

func IsStatusNotFoundErr added in v1.2.84

func IsStatusNotFoundErr(err error) bool

func ResolveImplementation

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

func ValidateRepositoryReference added in v1.2.84

func ValidateRepositoryReference(reference string) error

Types

type ApiInterface added in v1.2.77

type ApiInterface interface {
	GetRepoImageConfigFile(ctx context.Context, reference string) (*v1.ConfigFile, error)
}

type ArchiveOpener added in v1.2.169

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

type AzureCrRepositoryNotFoundErr added in v1.2.14

type AzureCrRepositoryNotFoundErr apiError

func NewAzureCrRepositoryNotFoundErr added in v1.2.14

func NewAzureCrRepositoryNotFoundErr(err error) AzureCrRepositoryNotFoundErr

type CopyImageOptions added in v1.2.225

type CopyImageOptions struct{}

type DockerHubRepositoryNotFoundErr added in v1.2.14

type DockerHubRepositoryNotFoundErr apiError

func NewDockerHubRepositoryNotFoundErr added in v1.2.14

func NewDockerHubRepositoryNotFoundErr(err error) DockerHubRepositoryNotFoundErr

type DockerHubUnauthorizedErr added in v1.2.14

type DockerHubUnauthorizedErr apiError

func NewDockerHubUnauthorizedErr added in v1.2.14

func NewDockerHubUnauthorizedErr(err error) DockerHubUnauthorizedErr

type DockerRegistryOptions

type DockerRegistryOptions struct {
	InsecureRegistry      bool
	SkipTlsVerifyRegistry bool
	DockerHubToken        string
	DockerHubUsername     string
	DockerHubPassword     string
	GitHubToken           string
	HarborUsername        string
	HarborPassword        string
	QuayToken             string
	SelectelAccount       string
	SelectelVPC           string
	SelectelVPCID         string
	SelectelUsername      string
	SelectelPassword      string
}

type DockerRegistryWithCache added in v1.2.77

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

func (*DockerRegistryWithCache) DeleteRepoImage added in v1.2.77

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

func (*DockerRegistryWithCache) IsTagExist added in v1.2.77

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

func (*DockerRegistryWithCache) MutateAndPushImage added in v1.2.77

func (r *DockerRegistryWithCache) MutateAndPushImage(ctx context.Context, sourceReference, destinationReference string, mutateConfigFunc func(v1.Config) (v1.Config, error)) error

func (*DockerRegistryWithCache) PushImage added in v1.2.77

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

func (*DockerRegistryWithCache) TagRepoImage added in v1.2.77

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

func (*DockerRegistryWithCache) Tags added in v1.2.77

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

type GcrOptions

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

type GetRepoImageOptions added in v1.2.226

type GetRepoImageOptions struct {
	IsImageIndex bool
}

type GitHubPackagesForbiddenErr added in v1.2.14

type GitHubPackagesForbiddenErr apiError

func NewGitHubPackagesForbiddenErr added in v1.2.14

func NewGitHubPackagesForbiddenErr(err error) GitHubPackagesForbiddenErr

type GitHubPackagesUnauthorizedErr added in v1.2.14

type GitHubPackagesUnauthorizedErr apiError

func NewGitHubPackagesUnauthorizedErr added in v1.2.14

func NewGitHubPackagesUnauthorizedErr(err error) GitHubPackagesUnauthorizedErr

type HarborRepositoryNotFoundErr added in v1.2.14

type HarborRepositoryNotFoundErr apiError

func NewHarborRepositoryNotFoundErr added in v1.2.14

func NewHarborRepositoryNotFoundErr(err error) HarborRepositoryNotFoundErr

type Interface added in v1.2.77

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
	GetRepoImage(ctx context.Context, reference string) (*image.Info, 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
	MutateAndPushImage(ctx context.Context, sourceReference, destinationReference string, mutateConfigFunc func(v1.Config) (v1.Config, error)) 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(repositoryAddress, implementation string, options DockerRegistryOptions) (Interface, error)

type ManifestListOptions added in v1.2.220

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

type Option added in v1.2.77

type Option func(*Options)

func WithCachedTags added in v1.2.77

func WithCachedTags() Option

type Options added in v1.2.77

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

type PushImageOptions

type PushImageOptions struct {
	Labels map[string]string
}

type QuayRepositoryNotFoundErr added in v1.2.14

type QuayRepositoryNotFoundErr apiError

func NewQuayRepositoryNotFoundErr added in v1.2.14

func NewQuayRepositoryNotFoundErr(err error) QuayRepositoryNotFoundErr

type SelectelRepositoryNotFoundErr added in v1.2.148

type SelectelRepositoryNotFoundErr apiError

func NewSelectelRepositoryNotFoundErr added in v1.2.148

func NewSelectelRepositoryNotFoundErr(err error) SelectelRepositoryNotFoundErr

type SelectelUnauthorizedErr added in v1.2.148

type SelectelUnauthorizedErr apiError

func NewSelectelUnauthorizedErr added in v1.2.148

func NewSelectelUnauthorizedErr(err error) SelectelUnauthorizedErr

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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