registry

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2013 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyExists = errors.New("Image already exists")

Functions

This section is empty.

Types

type ImgData

type ImgData struct {
	ID       string `json:"id"`
	Checksum string `json:"checksum,omitempty"`
	Tag      string `json:",omitempty"`
}

type Registry

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

func NewRegistry

func NewRegistry(root string, authConfig *auth.AuthConfig) (r *Registry, err error)

func (*Registry) GetAuthConfig

func (r *Registry) GetAuthConfig(withPasswd bool) *auth.AuthConfig

func (*Registry) GetRemoteHistory

func (r *Registry) GetRemoteHistory(imgId, registry string, token []string) ([]string, error)

Retrieve the history of a given image from the Registry. Return a list of the parent's json (requested image included)

func (*Registry) GetRemoteImageJSON added in v0.4.1

func (r *Registry) GetRemoteImageJSON(imgId, registry string, token []string) ([]byte, int, error)

Retrieve an image from the Registry.

func (*Registry) GetRemoteImageLayer

func (r *Registry) GetRemoteImageLayer(imgId, registry string, token []string) (io.ReadCloser, error)

func (*Registry) GetRemoteTags

func (r *Registry) GetRemoteTags(registries []string, repository string, token []string) (map[string]string, error)

func (*Registry) GetRepositoryData

func (r *Registry) GetRepositoryData(remote string) (*RepositoryData, error)

func (*Registry) LookupRemoteImage

func (r *Registry) LookupRemoteImage(imgId, registry string, authConfig *auth.AuthConfig) bool

Check if an image exists in the Registry

func (*Registry) PushImageJSONIndex added in v0.4.1

func (r *Registry) PushImageJSONIndex(remote string, imgList []*ImgData, validate bool, regs []string) (*RepositoryData, error)

func (*Registry) PushImageJSONRegistry added in v0.4.1

func (r *Registry) PushImageJSONRegistry(imgData *ImgData, jsonRaw []byte, registry string, token []string) error

Push a local image to the registry

func (*Registry) PushImageLayerRegistry

func (r *Registry) PushImageLayerRegistry(imgId string, layer io.Reader, registry string, token []string) error

func (*Registry) PushRegistryTag

func (r *Registry) PushRegistryTag(remote, revision, tag, registry string, token []string) error

push a tag on the registry. Remote has the format '<user>/<repo>

func (*Registry) SearchRepositories

func (r *Registry) SearchRepositories(term string) (*SearchResults, error)

type RepositoryData

type RepositoryData struct {
	ImgList   map[string]*ImgData
	Endpoints []string
	Tokens    []string
}

type SearchResults

type SearchResults struct {
	Query      string              `json:"query"`
	NumResults int                 `json:"num_results"`
	Results    []map[string]string `json:"results"`
}

Jump to

Keyboard shortcuts

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