Moving NewIndexInfo, NewRepositoryInfo and associated helpers into config.go

Signed-off-by: Don Kjer <don.kjer@gmail.com>
This commit is contained in:
Don Kjer 2015-01-07 23:42:01 +00:00
parent 64b000c3ea
commit c899a49a95
6 changed files with 290 additions and 282 deletions

View file

@ -17,13 +17,6 @@ import (
const (
// Where we store the config file
CONFIGFILE = ".dockercfg"
// Only used for user auth + account creation
INDEXSERVER = "https://index.docker.io/v1/"
REGISTRYSERVER = "https://registry-1.docker.io/v1/"
INDEXNAME = "docker.io"
// INDEXSERVER = "https://registry-stage.hub.docker.com/v1/"
)
var (
@ -43,14 +36,6 @@ type ConfigFile struct {
rootPath string
}
func IndexServerAddress() string {
return INDEXSERVER
}
func IndexServerName() string {
return INDEXNAME
}
// create a base64 encoded auth string to store in config
func encodeAuth(authConfig *AuthConfig) string {
authStr := authConfig.Username + ":" + authConfig.Password