Documentation ¶
Index ¶
- func NewRegistryOld(ctx context.Context, baseURL string, transport http.RoundTripper) (*oldRegistry, error)
- func WithMountFrom(ref reference.Canonical) distribution.BlobCreateOption
- type Client
- type ContainerConfig
- type DummyRegistryClient
- func (drc *DummyRegistryClient) AllTags(rn string) ([]string, error)
- func (drc *DummyRegistryClient) BecomeFoolishlyTrusting()
- func (drc *DummyRegistryClient) Cancel()
- func (drc *DummyRegistryClient) FeedMetadata(md Metadata)
- func (drc *DummyRegistryClient) FeedTags(ts []string)
- func (drc *DummyRegistryClient) GetImageMetadata(in, et string) (Metadata, error)
- func (drc *DummyRegistryClient) LabelsForImageName(in string) (map[string]string, error)
- type Metadata
- type Registries
- type V1Schema
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 ¶
func WithMountFrom(ref reference.Canonical) distribution.BlobCreateOption
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
type ContainerConfig ¶
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 ¶
Registries is a map+Mutex
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