registry

package
Version: v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHost added in v0.4.0

func DefaultHost() string

func DefaultRepository

func DefaultRepository() string

func IsDefaultRegistry added in v0.4.0

func IsDefaultRegistry(image string) bool

Types

type Credentials

type Credentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Image added in v0.6.0

type Image struct {
	Repository string   // image repository eg. `registry.gitlab.com/my/project`
	Tag        string   // image tag eg. `0.1.0`
	Aliases    []string // additional tags pointing to the same image eg. `latest, test`
	Username   string   // registry username
	Password   string   // registry password
}

This type represents a Docker image with credentials used to authenticate to a registry that stores it

func (Image) Locations added in v0.6.0

func (image Image) Locations() []string

All locations of the image, including all aliases of the tag

func (Image) PullRegistry added in v0.6.0

func (image Image) PullRegistry() Registry

PushRegistry() returns details of a registry that one can use to pull this image from. This is also valid after GitLab CI/CD job is complete.

func (Image) PushRegistry added in v0.6.0

func (image Image) PushRegistry() Registry

PushRegistry() returns details of a registry that one can use to push this image to

func (Image) ToRepository added in v0.6.0

func (image Image) ToRepository() string

func (Image) ToString added in v0.6.0

func (image Image) ToString() string

ToString() returns a full image name (with a tag)

type Registry

type Registry struct {
	Host string
	Credentials
}

func NewWithPullAccess

func NewWithPullAccess() Registry

func NewWithPushAccess

func NewWithPushAccess() Registry

func (Registry) ToAuthFileContents

func (registry Registry) ToAuthFileContents() (string, error)

Jump to

Keyboard shortcuts

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