client

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INDEX_SERVER  = "https://index.docker.io/v1/"
	DOCKER_SOCKET = "unix:///var/run/docker.sock"
)

Variables

This section is empty.

Functions

func NewDockerClient

func NewDockerClient(configPath, hostName string, out io.Writer) (*api.DockerClient, error)

func ParseRepositoryName

func ParseRepositoryName(name string) (string, string, string, error)

Types

type Config

type Config struct {
	Default    string     `yaml:"default"`
	Hosts      []Host     `yaml:"hosts"`
	Registries []Registry `yaml:"registries,omitempty"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

func (*Config) GetDefaultHost

func (config *Config) GetDefaultHost() (*Host, error)

func (*Config) GetHost

func (config *Config) GetHost(name string) (*Host, error)

func (*Config) GetRegistry

func (config *Config) GetRegistry(reg string) (*Registry, error)

func (*Config) LogoutRegistry

func (config *Config) LogoutRegistry(reg string)

func (*Config) SaveConfig

func (config *Config) SaveConfig(path string) error

func (*Config) SetRegistry

func (config *Config) SetRegistry(newRegistry *Registry)

type Host

type Host struct {
	Name        string `yaml:"name"`
	URL         string `yaml:"url"`
	Description string `yaml:"description,omitempty"`
	TLS         bool   `yaml:"tls,omitempty"`
	TLSCaCert   string `yaml:"tls-ca-cert,omitempty"`
	TLSCert     string `yaml:"tls-cert,omitempty"`
	TLSKey      string `yaml:"tls-key,omitempty"`
	TLSVerify   bool   `yaml:"tls-verify,omitempty"`
}

type Registry

type Registry struct {
	Registry    string `yaml:"registry"`
	Username    string `yaml:"username"`
	Email       string `yaml:"email"`
	Credentials string `yaml:"credentials,omitempty"`
}

Jump to

Keyboard shortcuts

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