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

Function getAuthConfigKey

cli/command/manifest/annotate.go:65–70  ·  view source on GitHub ↗

getAuthConfigKey special-cases using the full index address of the official index as the AuthConfig key, and uses the (host)name[:port] for private indexes. It is similar to [registry.GetAuthConfigKey], but does not require on [registrytypes.IndexInfo] as intermediate. [registry.GetAuthConfigKey]:

(domainName string)

Source from the content-addressed store, hash-verified

63// [registry.GetAuthConfigKey]: https://pkg.go.dev/github.com/docker/docker@v28.3.3+incompatible/registry#GetAuthConfigKey
64// [registrytypes.IndexInfo]: https://pkg.go.dev/github.com/docker/docker@v28.3.3+incompatible/api/types/registry#IndexInfo
65func getAuthConfigKey(domainName string) string {
66 if domainName == "docker.io" || domainName == "index.docker.io" {
67 return authConfigKey
68 }
69 return domainName
70}
71
72// newRegistryClient returns a client for communicating with a Docker distribution
73// registry

Callers 1

newRegistryClientFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…