Documentation ¶
Overview ¶
Package registry provides domain abstractions over container registries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Credentials Credentials Logger log.Logger }
Client is a handle to a registry.
func (*Client) GetRepository ¶
func (c *Client) GetRepository(repository string) (*Repository, error)
GetRepository yields a repository matching the given name, if any exists. Repository may be of various forms, in which case omitted elements take assumed defaults.
helloworld -> index.docker.io/library/helloworld foo/helloworld -> index.docker.io/foo/helloworld quay.io/foo/helloworld -> quay.io/foo/helloworld
type Credentials ¶
type Credentials map[string]dockerregistry.Authenticator
Credentials to a (Docker) registry.
func CredentialsFromFile ¶
func CredentialsFromFile(path string) (Credentials, error)
CredentialsFromFile returns a credentials object parsed from the given filepath.
func NoCredentials ¶
func NoCredentials() Credentials
NoCredentials returns a usable but empty credentials object.
func (Credentials) For ¶
func (cs Credentials) For(host string) dockerregistry.Authenticator
For yields an authenticator for a specific host.
func (Credentials) Hosts ¶
func (cs Credentials) Hosts() []string
Hosts returns all of the hosts available in these credentials.
type Image ¶
type Image struct { Registry string // "quay.io:5000" Name string // "weaveworks/helloworld" Tag string // "master-59f0001" CreatedAt time.Time // Always UTC }
Image represents a specific container image available in a repository. It's a struct because I think we can safely assume the data here is pretty universal across different registries and repositories.
func ParseImage ¶
ParseImage splits the image string apart, returning an Image with as much info as we can gather.
func (Image) Repository ¶
Repository returns a string with as much info as we have to rebuild the image repository (i.e. registry/name)
type Repository ¶
Repository is a collection of images with the same registry and name (e.g,. "quay.io:5000/weaveworks/helloworld") but not the same tag (e.g., "quay.io:5000/weaveworks/helloworld:v0.1").