docker_registry

package
v0.0.3-prerelease3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2017 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistryOld

func NewRegistryOld(ctx context.Context, baseURL string, transport http.RoundTripper) (*oldRegistry, error)

NewRegistry creates a registry namespace which can be used to get a listing of repositories

func WithMountFrom

WithMountFrom returns a BlobCreateOption which designates that the blob should be mounted from the given canonical reference.

Types

type Client

type Client interface {
	LabelsForImageName(string) (map[string]string, error)
	GetImageMetadata(imageName, etag string) (Metadata, error)
	AllTags(repoName string) ([]string, error)
	Cancel()
	BecomeFoolishlyTrusting()
}

Client is the interface for interacting with a docker registry

func NewClient

func NewClient() Client

NewClient builds a new client

type ContainerConfig

type ContainerConfig struct {
	Labels map[string]string
	Cmd    []string
}

ContainerConfig captures the configuration of a docker container

type DummyRegistryClient

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

DummyRegistryClient is a type for use in testing - it supports the Client interface, while only returning metadata that are fed to it

func NewDummyClient

func NewDummyClient() *DummyRegistryClient

NewDummyClient builds and returns a DummyRegistryClient

func (*DummyRegistryClient) AllTags

func (drc *DummyRegistryClient) AllTags(rn string) ([]string, error)

AllTags fulfills part of Client

func (*DummyRegistryClient) BecomeFoolishlyTrusting

func (drc *DummyRegistryClient) BecomeFoolishlyTrusting()

BecomeFoolishlyTrusting fulfills part of Client

func (*DummyRegistryClient) Cancel

func (drc *DummyRegistryClient) Cancel()

Cancel fulfills part of Client

func (*DummyRegistryClient) FeedMetadata

func (drc *DummyRegistryClient) FeedMetadata(md Metadata)

FeedMetadata is the strings on the marrionette of DummyRegistryClient - having triggered a call to GetImageMetadata or LabelsForImageName, use FeedMetadata to send the Metadata that the notional docker registry might return

func (*DummyRegistryClient) FeedTags

func (drc *DummyRegistryClient) FeedTags(ts []string)

FeedTags is the strings on the marrionette of DummyRegistryClient - having triggered a call to GetImageMetadata or LabelsForImageName, use FeedMetadata to send the Metadata that the notional docker registry might return

func (*DummyRegistryClient) GetImageMetadata

func (drc *DummyRegistryClient) GetImageMetadata(in, et string) (Metadata, error)

GetImageMetadata fulfills part of Client

func (*DummyRegistryClient) LabelsForImageName

func (drc *DummyRegistryClient) LabelsForImageName(in string) (map[string]string, error)

LabelsForImageName fulfills part of Client

type Metadata

type Metadata struct {
	Registry      string
	Labels        map[string]string
	Etag          string
	CanonicalName string
	AllNames      []string
}

Metadata represents the descriptive data for a docker image

type Registries

type Registries struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Registries is a map+Mutex

func NewRegistries

func NewRegistries() Registries

NewRegistries makes a Registries

func (*Registries) AddRegistry

func (rs *Registries) AddRegistry(n string, r *registry) error

AddRegistry adds a registry to the registry map

func (*Registries) DeleteRegistry

func (rs *Registries) DeleteRegistry(n string) error

DeleteRegistry deletes a registry from the map

func (*Registries) GetRegistry

func (rs *Registries) GetRegistry(n string) *registry

GetRegistry gets a registry from the registry map

type V1Schema

type V1Schema struct {
	//ContainerConfig ContainerConfig `json:"container_config"`
	CC        ContainerConfig `json:"container_config"`
	Container string          `json:"container"`
}

V1Schema Represents the original v1 schema data for a container

Jump to

Keyboard shortcuts

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