package cliconfig
import "github.com/dotcloud/docker/cliconfig"
Index ¶
- Constants
- Variables
- func DecodeAuth(authStr string) (string, string, error)
- func EncodeAuth(authConfig *AuthConfig) string
- type AuthConfig
- type ConfigFile
Constants ¶
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 ¶
Functions ¶
func DecodeAuth ¶
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
Source Files ¶
- Version
- v1.7.1
- Published
- Jul 14, 2015
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 3 minutes ago –
Tools for package owners.