config

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDockerJSON = "~/.docker/config.json"

DefaultDockerJSON is the defalt path for Docker JSON config file

Functions

This section is empty.

Types

type Auth

type Auth struct {
	B64Auth string `json:"auth"`
}

Auth contains Docker registry username and password in base64-encoded form

type Config

type Config struct {
	Auths map[string]Auth `json:"auths"`
	// contains filtered or unexported fields
}

Config encapsulates configuration loaded from Docker 'config.json' file

func Load

func Load(fileName string) (*Config, error)

Load loads a Config object from Docker JSON configuration file specified

func (*Config) GetCredentials

func (c *Config) GetCredentials(registry string) (string, string, bool)

GetCredentials gets per-registry credentials from loaded Docker config

func (*Config) GetRegistryAuth

func (c *Config) GetRegistryAuth(registry string) string

GetRegistryAuth gets per-registry base64 authentication string

func (*Config) IsEmpty

func (c *Config) IsEmpty() bool

IsEmpty return true if structure has no relevant data inside

Jump to

Keyboard shortcuts

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