dockerregistry

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsImageNotFound

func IsImageNotFound(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func IsRegistryNotFound

func IsRegistryNotFound(err error) bool

func IsRepositoryNotFound

func IsRepositoryNotFound(err error) bool

func IsTagNotFound

func IsTagNotFound(err error) bool

func NewImageNotFoundError

func NewImageNotFoundError(repository, image, tag string) error

Types

type Client

type Client interface {
	// Connect to a Docker registry by name. Pass "" for the Docker Hub
	Connect(registry string, allowInsecure bool) (Connection, error)
}

Client includes methods for accessing a Docker registry by name.

func NewClient

func NewClient() Client

NewClient returns a client object which allows public access to a Docker registry. TODO: accept a docker auth config

type Connection

type Connection interface {
	// ImageTags will return a map of the tags for the image by namespace (if not
	// specified, will be "library") and name.
	ImageTags(namespace, name string) (map[string]string, error)
	// ImageByID will return the requested image by namespace (if not specified,
	// will be "library"), name, and ID.
	ImageByID(namespace, name, id string) (*docker.Image, error)
	// ImageByTag will return the requested image by namespace (if not specified,
	// will be "library"), name, and tag (if not specified, "latest").
	ImageByTag(namespace, name, tag string) (*docker.Image, error)
}

Connection allows you to retrieve data from a Docker V1 registry.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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