MCPcopy Index your code
hub / github.com/devspace-sh/devspace / GetAllAuthConfigs

Function GetAllAuthConfigs

pkg/devspace/docker/config.go:33–57  ·  view source on GitHub ↗

GetAllAuthConfigs returns every auth config found in the docker config

()

Source from the content-addressed store, hash-verified

31
32// GetAllAuthConfigs returns every auth config found in the docker config
33func GetAllAuthConfigs() (map[string]dockerregistry.AuthConfig, error) {
34 config, err := LoadDockerConfig()
35 if err != nil {
36 return nil, err
37 }
38
39 authMap, err := config.GetAllCredentials()
40 if err != nil {
41 return nil, err
42 }
43
44 retMap := make(map[string]dockerregistry.AuthConfig)
45 for k, v := range authMap {
46 // convert
47 authconfigConverted := &dockerregistry.AuthConfig{}
48 err = util.Convert(v, authconfigConverted)
49 if err != nil {
50 return nil, err
51 }
52
53 retMap[k] = *authconfigConverted
54 }
55
56 return retMap, nil
57}

Callers 1

TestGetAllAuthConfigsFunction · 0.85

Calls 2

ConvertFunction · 0.92
LoadDockerConfigFunction · 0.85

Tested by 1

TestGetAllAuthConfigsFunction · 0.68