forked from TrueCloudLab/distribution
Moving NewIndexInfo, NewRepositoryInfo and associated helpers into config.go
Signed-off-by: Don Kjer <don.kjer@gmail.com>
This commit is contained in:
parent
64b000c3ea
commit
c899a49a95
6 changed files with 290 additions and 282 deletions
15
docs/auth.go
15
docs/auth.go
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue