cliconfig

package
v1.7.0-rc4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Where we store the config file
	CONFIGFILE     = "config.json"
	OLD_CONFIGFILE = ".dockercfg"

	// This constant is only used for really old config files when the
	// URL wasn't saved as part of the config file and it was just
	// assumed to be this value.
	DEFAULT_INDEXSERVER = "https://index.docker.io/v1/"
)

Variables

View Source
var (
	ErrConfigFileMissing = errors.New("The Auth config file is missing")
)

Functions

func DecodeAuth

func DecodeAuth(authStr string) (string, string, error)

decode the auth string

func EncodeAuth

func EncodeAuth(authConfig *AuthConfig) string

create a base64 encoded auth string to store in config

Types

type AuthConfig

type AuthConfig struct {
	Username      string `json:"username,omitempty"`
	Password      string `json:"password,omitempty"`
	Auth          string `json:"auth"`
	Email         string `json:"email"`
	ServerAddress string `json:"serveraddress,omitempty"`
}

Registry Auth Info

type ConfigFile

type ConfigFile struct {
	AuthConfigs map[string]AuthConfig `json:"auths"`
	HttpHeaders map[string]string     `json:"HttpHeaders,omitempty"`
	// contains filtered or unexported fields
}

~/.docker/config.json file info

func Load

func Load(configDir string) (*ConfigFile, error)

load up the auth config information and return values FIXME: use the internal golang config parser

func NewConfigFile

func NewConfigFile(fn string) *ConfigFile

func (*ConfigFile) Filename

func (config *ConfigFile) Filename() string

func (*ConfigFile) Save

func (configFile *ConfigFile) Save() error

Jump to

Keyboard shortcuts

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