registry

package
v0.0.0-...-d69b078 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// INDEXSERVER is the default docker index server
	INDEXSERVER = "https://index.docker.io/v1/"
	// REGISTRYSERVER ...
	REGISTRYSERVER = "https://registry-1.docker.io/v1/"
)

Variables

View Source
var (
	// ErrNotARegistryAddress is returned when a registry address is not valid.
	ErrNotARegistryAddress = errors.New("not a registry address")

	// ErrNotAValidRepositoryName is returned when a repository name is not valid.
	ErrNotAValidRepositoryName = errors.New("not a valid repository name")
)

Functions

func GetAuthConfiguration

func GetAuthConfiguration(pkg string) *dockerapi.AuthConfiguration

GetAuthConfiguration returns an auth object for the registry.

func RegisterConfigDecoder

func RegisterConfigDecoder()

RegisterConfigDecoder with the engine.

Types

type Config

type Config struct {
	Name          string `mapstructure:"-"`
	Username      string `mapstructure:"username" version:"1"`
	Password      string `mapstructure:"password" version:"1"`
	Email         string `mapstructure:"email" version:"1"`
	ServerAddress string `mapstructure:"address" version:"1"`
}

Config structure for a Registry

func DecodeConfig

func DecodeConfig(cont []toml.Primitive) ([]*Config, error)

DecodeConfig returns a parsed config object

func NewConfig

func NewConfig() *Config

NewConfig returns a RegistryConfig with defaults

func (*Config) Hash

func (c *Config) Hash() string

Hash returns the unique hash for this config object

func (*Config) Target

func (c *Config) Target() *engine.NameSpace

Target returns the namespace of the target of this config

func (*Config) Version

func (c *Config) Version() int

Version of our config object TODO: automate

type ConfigDecoder

type ConfigDecoder struct{}

ConfigDecoder object

func (*ConfigDecoder) DecodeConfig

func (cd *ConfigDecoder) DecodeConfig(data interface{}) (engine.Config, error)

DecodeConfig returns a parsed config object

type List

type List struct {
	Registries []*Registry
}

List of Registries we know about

func NewList

func NewList() *List

NewList returns a new Registry List object

func (*List) BuildNewList

func (rl *List) BuildNewList() error

BuildNewList (re)creates the internal registry list

func (*List) Command

func (rl *List) Command(cmd *engine.Command) error

Command takes a Command object and triggers events

type Registry

type Registry struct {
	sync.Mutex
	Name          string
	Username      string
	Password      string
	Email         string
	ServerAddress string
}

Registry represents a docker registry

func NewRegistry

func NewRegistry(name string) *Registry

NewRegistry returns a new Registry object, with defaults

func (*Registry) Command

func (r *Registry) Command(cmd *engine.Command) error

Command takes a Command object and triggers events TODO: Delete

Jump to

Keyboard shortcuts

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