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 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
Click to show internal directories.
Click to hide internal directories.