registry

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exist

func Exist(ctx context.Context, reference string, tag string) (bool, error)

func Exists

func Exists(ctx context.Context, img *Image, registries []Registry) (map[string]bool, error)

Types

type Exister

type Exister interface {
	Exist(context.Context, string, string) (bool, error)
	GetName() string
}

type Image

type Image struct {
	Registry   string
	Repository string
	Tag        string
	Digest     string
}

func (Image) Elements

func (i Image) Elements() (string, string, string)

func (Image) ImageName

func (i Image) ImageName() (string, error)

func (*Image) In

func (i *Image) In(s []Image) bool

func (Image) String

func (i Image) String() (string, error)

func (Image) TagOrDigest

func (i Image) TagOrDigest() (string, error)

type ImportOption

type ImportOption struct {
	Imgs       []*Image
	Registries []Registry

	All bool
}

func (ImportOption) Run

func (io ImportOption) Run(ctx context.Context) error

type Puller

type Puller interface {
	Pull(context.Context, string, string) (bool, error)
}

type Pusher

type Pusher interface {
	Exister
	Push(ctx context.Context, sourceURL string, img string, tag string) (v1.Descriptor, error)
}

type Registry

type Registry struct {
	Name string
	URL  string
}

func (Registry) Exist

func (r Registry) Exist(ctx context.Context, name string, tag string) (bool, error)

func (Registry) GetName

func (r Registry) GetName() string

func (Registry) Pull

func (r Registry) Pull(ctx context.Context, name string, tag string) (bool, error)

func (Registry) Push

func (r Registry) Push(ctx context.Context, sourceURL string, name string, tag string) (v1.Descriptor, error)

Jump to

Keyboard shortcuts

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