registry

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 19 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, plainHTTP bool) (bool, error)

func Exists

func Exists(ctx context.Context, ref string, tag string, registries []Registry) map[string]bool

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
	UseDigest  bool
	Patch      *bool
}

func RefToImage added in v0.1.6

func RefToImage(r string) (Image, error)

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

	Architecture *string
	All          bool
}

func (ImportOption) Run

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

type Puller

type Puller interface {
	Pull(context.Context, string, string) (*v1.Descriptor, error)
}

type Pusher

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

type Registry

type Registry struct {
	Name      string
	URL       string
	Insecure  bool
	PlainHTTP bool
}

func (Registry) Exist

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

func (Registry) Fetch added in v0.1.8

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

func (Registry) GetName

func (r Registry) GetName() string

func (Registry) Pull

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

func (Registry) Push

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

Jump to

Keyboard shortcuts

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