MCPcopy Create free account
hub / github.com/docker/cli / Get

Method Get

cli/config/credentials/native_store.go:43–57  ·  view source on GitHub ↗

Get retrieves credentials for a specific server from the native store.

(serverAddress string)

Source from the content-addressed store, hash-verified

41
42// Get retrieves credentials for a specific server from the native store.
43func (c *nativeStore) Get(serverAddress string) (types.AuthConfig, error) {
44 // load user email if it exist or an empty auth config.
45 auth, _ := c.fileStore.Get(serverAddress)
46
47 creds, err := c.getCredentialsFromStore(serverAddress)
48 if err != nil {
49 return auth, err
50 }
51 auth.Username = creds.Username
52 auth.IdentityToken = creds.IdentityToken
53 auth.Password = creds.Password
54 auth.ServerAddress = creds.ServerAddress
55
56 return auth, nil
57}
58
59// GetAll retrieves all the credentials from the native store.
60func (c *nativeStore) GetAll() (map[string]types.AuthConfig, error) {

Calls 2

GetMethod · 0.65