Documentation ¶
Index ¶
- Constants
- Variables
- func Close(client Client)
- func ReadDockerAuthConfigsFromHomeDir(userName string) (_ *docker.AuthConfigurations, err error)
- func ResolveDockerAuthConfig(indexName string, configs *docker.AuthConfigurations) *docker.AuthConfiguration
- func SplitDockerImageName(reposName string) (string, string)
- type Client
- type DockerCredentials
- type Machine
- type MockClient
- func (m *MockClient) AttachToContainerNonBlocking(opts docker.AttachToContainerOptions) (docker.CloseWaiter, error)
- func (m *MockClient) CreateContainer(opts docker.CreateContainerOptions) (*docker.Container, error)
- func (m *MockClient) DisconnectNetwork(id string, opts docker.NetworkConnectionOptions) error
- func (m *MockClient) ImportImage(opts docker.ImportImageOptions) error
- func (m *MockClient) Info() (*docker.Env, error)
- func (m *MockClient) InspectContainer(id string) (*docker.Container, error)
- func (m *MockClient) InspectImage(name string) (*docker.Image, error)
- func (m *MockClient) KillContainer(opts docker.KillContainerOptions) error
- func (m *MockClient) ListNetworks() ([]docker.Network, error)
- func (m *MockClient) Logs(opts docker.LogsOptions) error
- func (m *MockClient) PullImage(opts docker.PullImageOptions, auth docker.AuthConfiguration) error
- func (m *MockClient) RemoveContainer(opts docker.RemoveContainerOptions) error
- func (m *MockClient) StartContainer(id string, hostConfig *docker.HostConfig) error
- type MockMachine
- func (m *MockMachine) CanConnect(name string) bool
- func (m *MockMachine) Create(driver string, name string, opts ...string) error
- func (m *MockMachine) Credentials(name string) (DockerCredentials, error)
- func (m *MockMachine) Exist(name string) bool
- func (m *MockMachine) List(nodeFilter string) ([]string, error)
- func (m *MockMachine) Provision(name string) error
- func (m *MockMachine) Remove(name string) error
Constants ¶
View Source
const DefaultDockerRegistry = "docker.io"
DefaultDockerRegistry is the name of the index
Variables ¶
View Source
var HomeDirectory = homedir.Get()
Functions ¶
func ReadDockerAuthConfigsFromHomeDir ¶ added in v1.8.0
func ResolveDockerAuthConfig ¶
func ResolveDockerAuthConfig(indexName string, configs *docker.AuthConfigurations) *docker.AuthConfiguration
ResolveDockerAuthConfig taken from: https://github.com/docker/docker/blob/master/registry/auth.go
func SplitDockerImageName ¶
SplitDockerImageName breaks a reposName into an index name and remote name
Types ¶
type Client ¶
type Client interface { InspectImage(name string) (*docker.Image, error) PullImage(opts docker.PullImageOptions, auth docker.AuthConfiguration) error ImportImage(opts docker.ImportImageOptions) error CreateContainer(opts docker.CreateContainerOptions) (*docker.Container, error) StartContainer(id string, hostConfig *docker.HostConfig) error KillContainer(opts docker.KillContainerOptions) error InspectContainer(id string) (*docker.Container, error) AttachToContainerNonBlocking(opts docker.AttachToContainerOptions) (docker.CloseWaiter, error) RemoveContainer(opts docker.RemoveContainerOptions) error DisconnectNetwork(id string, opts docker.NetworkConnectionOptions) error ListNetworks() ([]docker.Network, error) Logs(opts docker.LogsOptions) error Info() (*docker.Env, error) }
type DockerCredentials ¶
type DockerCredentials struct { Host string `toml:"host,omitempty" json:"host" long:"host" env:"DOCKER_HOST" description:"Docker daemon address"` CertPath string `toml:"tls_cert_path,omitempty" json:"tls_cert_path" long:"cert-path" env:"DOCKER_CERT_PATH" description:"Certificate path"` TLSVerify bool `` /* 129-byte string literal not displayed */ }
type Machine ¶
type Machine interface { Create(driver, name string, opts ...string) error Provision(name string) error Remove(name string) error List(nodeFilter string) (machines []string, err error) Exist(name string) bool CanConnect(name string) bool Credentials(name string) (DockerCredentials, error) }
func NewMachineCommand ¶
func NewMachineCommand() Machine
type MockClient ¶ added in v1.5.0
func (*MockClient) AttachToContainerNonBlocking ¶ added in v1.9.0
func (m *MockClient) AttachToContainerNonBlocking(opts docker.AttachToContainerOptions) (docker.CloseWaiter, error)
func (*MockClient) CreateContainer ¶ added in v1.5.0
func (m *MockClient) CreateContainer(opts docker.CreateContainerOptions) (*docker.Container, error)
func (*MockClient) DisconnectNetwork ¶ added in v1.8.0
func (m *MockClient) DisconnectNetwork(id string, opts docker.NetworkConnectionOptions) error
func (*MockClient) ImportImage ¶ added in v1.5.0
func (m *MockClient) ImportImage(opts docker.ImportImageOptions) error
func (*MockClient) Info ¶ added in v1.5.0
func (m *MockClient) Info() (*docker.Env, error)
func (*MockClient) InspectContainer ¶ added in v1.5.0
func (m *MockClient) InspectContainer(id string) (*docker.Container, error)
func (*MockClient) InspectImage ¶ added in v1.5.0
func (m *MockClient) InspectImage(name string) (*docker.Image, error)
func (*MockClient) KillContainer ¶ added in v1.5.0
func (m *MockClient) KillContainer(opts docker.KillContainerOptions) error
func (*MockClient) ListNetworks ¶ added in v1.8.0
func (m *MockClient) ListNetworks() ([]docker.Network, error)
func (*MockClient) Logs ¶ added in v1.5.0
func (m *MockClient) Logs(opts docker.LogsOptions) error
func (*MockClient) PullImage ¶ added in v1.5.0
func (m *MockClient) PullImage(opts docker.PullImageOptions, auth docker.AuthConfiguration) error
func (*MockClient) RemoveContainer ¶ added in v1.5.0
func (m *MockClient) RemoveContainer(opts docker.RemoveContainerOptions) error
func (*MockClient) StartContainer ¶ added in v1.5.0
func (m *MockClient) StartContainer(id string, hostConfig *docker.HostConfig) error
type MockMachine ¶ added in v1.5.0
func (*MockMachine) CanConnect ¶ added in v1.5.0
func (m *MockMachine) CanConnect(name string) bool
func (*MockMachine) Create ¶ added in v1.5.0
func (m *MockMachine) Create(driver string, name string, opts ...string) error
func (*MockMachine) Credentials ¶ added in v1.5.0
func (m *MockMachine) Credentials(name string) (DockerCredentials, error)
func (*MockMachine) Exist ¶ added in v1.5.0
func (m *MockMachine) Exist(name string) bool
func (*MockMachine) List ¶ added in v1.5.0
func (m *MockMachine) List(nodeFilter string) ([]string, error)
func (*MockMachine) Provision ¶ added in v1.5.0
func (m *MockMachine) Provision(name string) error
func (*MockMachine) Remove ¶ added in v1.5.0
func (m *MockMachine) Remove(name string) error
Click to show internal directories.
Click to hide internal directories.