registry

package
v0.0.0-...-9f0a716 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const EnvInsecure = "INSECURE_REGISTRY"

EnvInsecure - uses insecure registry client to skip cert verification

Variables

View Source
var (
	ErrTagNotSupplied = errors.New("tag not supplied")
)

errors

Functions

func LogFormatter

func LogFormatter(format string, args ...interface{})

LogFormatter - formatter callback passed into registry client

Types

type Client

type Client interface {
	Get(opts Opts) (*Repository, error)
	Digest(opts Opts) (string, error)
}

Client - generic docker registry client

type DefaultClient

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

DefaultClient - default client implementation

func New

func New() *DefaultClient

New - new registry client

func (*DefaultClient) Digest

func (c *DefaultClient) Digest(opts Opts) (string, error)

Digest - get digest for repo

func (*DefaultClient) Get

func (c *DefaultClient) Get(opts Opts) (*Repository, error)

Get - get repository

type Opts

type Opts struct {
	Registry, Name, Tag string
	Username, Password  string // if "" - anonymous
}

Opts - registry client opts. If username & password are not supplied it will try to authenticate as anonymous

type Repository

type Repository struct {
	Name string
	Tags []string // available tags
}

Repository - holds repository related info

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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