registry

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLink(linkHeader string) string

func IsInvalidConfig added in v0.4.0

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func RetagImage

func RetagImage(repo, tag, srcRegistry, dstRegistry string) error

Types

type Config

type Config struct {
	Name           string
	HttpClient     http.Client
	RegistryClient RegistryClient
}

type DecoratedRegistry added in v0.4.0

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

func NewDecoratedRegistry added in v0.4.0

func NewDecoratedRegistry(config DecoratedRegistryConfig) (*DecoratedRegistry, error)

func (*DecoratedRegistry) ListRepositories added in v0.4.0

func (r *DecoratedRegistry) ListRepositories(ctx context.Context) ([]string, error)

func (*DecoratedRegistry) ListTags added in v0.4.0

func (r *DecoratedRegistry) ListTags(ctx context.Context, repository string) ([]string, error)

func (*DecoratedRegistry) Login added in v0.4.0

func (r *DecoratedRegistry) Login(ctx context.Context, user, password string) error

func (*DecoratedRegistry) Logout added in v0.4.0

func (r *DecoratedRegistry) Logout(ctx context.Context) error

func (DecoratedRegistry) Name added in v0.5.0

func (r DecoratedRegistry) Name() string

func (*DecoratedRegistry) Pull added in v0.4.0

func (r *DecoratedRegistry) Pull(ctx context.Context, repo, tag string) error

func (*DecoratedRegistry) Push added in v0.4.0

func (r *DecoratedRegistry) Push(ctx context.Context, repo, tag string) error

func (*DecoratedRegistry) RemoveImage added in v0.4.0

func (r *DecoratedRegistry) RemoveImage(ctx context.Context, repo, tag string) error

type DecoratedRegistryConfig added in v0.4.0

type DecoratedRegistryConfig struct {
	RateLimiter DecoratedRegistryConfigRateLimiter
	Underlying  Interface
}

type DecoratedRegistryConfigRateLimiter added in v0.4.0

type DecoratedRegistryConfigRateLimiter struct {
	ListRepositories *rate.Limiter
	ListTags         *rate.Limiter
	Pull             *rate.Limiter
	Push             *rate.Limiter
}

type Interface added in v0.4.0

type Interface interface {
	Login(ctx context.Context, user, password string) error
	Logout(ctx context.Context) error
	ListRepositories(ctx context.Context) ([]string, error)
	ListTags(ctx context.Context, repository string) ([]string, error)
	Name() string
	Pull(ctx context.Context, repo, tag string) error
	Push(ctx context.Context, repo, tag string) error
	RemoveImage(ctx context.Context, repo, tag string) error
}

type Registry

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

func New

func New(c Config) (*Registry, error)

func (*Registry) ListRepositories added in v0.3.0

func (r *Registry) ListRepositories(ctx context.Context) ([]string, error)

func (*Registry) ListTags added in v0.3.0

func (r *Registry) ListTags(ctx context.Context, repository string) ([]string, error)

func (*Registry) Login

func (r *Registry) Login(ctx context.Context, user, password string) error

func (*Registry) Logout

func (r *Registry) Logout(ctx context.Context) error

func (Registry) Name added in v0.5.0

func (r Registry) Name() string

func (*Registry) Pull added in v0.4.0

func (r *Registry) Pull(ctx context.Context, repo, tag string) error

func (*Registry) Push added in v0.4.0

func (r *Registry) Push(ctx context.Context, repo, tag string) error

func (*Registry) RemoveImage

func (r *Registry) RemoveImage(ctx context.Context, repo, tag string) error

type RegistryClient added in v0.3.0

type RegistryClient interface {
	Authorize(ctx context.Context, user, password string) error
	ListRepositories(ctx context.Context) ([]string, error)
	ListTags(ctx context.Context, repositry string) ([]string, error)
}

type Repository

type Repository struct {
	Name string
	Tags []string
}

Jump to

Keyboard shortcuts

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