package
1.33.0-alpha.2
Repository: https://github.com/kubernetes/kubernetes.git
Documentation: pkg.go.dev
# Functions
DefaultDockercfgPaths returns default search paths of .dockercfg.
DefaultDockerConfigJSONPaths returns default search paths of .docker/config.json.
GetPreferredDockercfgPath get preferred docker config path.
NewDockerKeyring creates a DockerKeyring to use for resolving credentials, which draws from the set of registered credential providers.
ParseSchemelessURL parses a schemeless url and returns a url.URL url.Parse require a scheme, but ours don't have schemes.
ReadDockercfgFile attempts to read a legacy dockercfg file from the given paths.
ReadDockerConfigFile read a docker config file from default path.
ReadDockerConfigFileFromBytes read a docker config file from the given bytes.
ReadDockerConfigJSONFile attempts to read a docker config.json file from the given paths.
ReadSpecificDockerConfigJSONFile attempts to read docker configJSON from a given file path.
ReadURL read contents from given url.
RegisterCredentialProvider is called by provider implementations on initialization to register themselves, like so:
func init() { RegisterCredentialProvider("name", &myProvider{...}) }.
SetPreferredDockercfgPath set preferred docker config path.
SplitURL splits the host name into parts, as well as the port.
URLsMatch checks whether the given target url matches the glob url, which may have glob wild cards in the host name.
URLsMatchStr is wrapper for URLsMatch, operating on strings instead of URLs.
# Structs
AuthConfig contains authorization information for connecting to a Registry This type mirrors "github.com/docker/docker/api/types.AuthConfig".
BasicDockerKeyring is a trivial map-backed implementation of DockerKeyring.
CachingDockerConfigProvider implements DockerConfigProvider by composing with another DockerConfigProvider and caching the DockerConfig it provides for a pre-specified lifetime.
DockerConfigEntry wraps a docker config as a entry.
DockerConfigJSON represents ~/.docker/config.json file info see https://github.com/docker/docker/pull/12009.
FakeKeyring a fake config credentials.
HTTPError wraps a non-StatusOK error code as an error.
# Interfaces
DockerConfigProvider is the interface that registered extensions implement to materialize 'dockercfg' credentials.
DockerKeyring tracks a set of docker registry credentials, maintaining a reverse index across the registry endpoints.
# Type aliases
DockerConfig represents the config file used by the docker CLI.
UnionDockerKeyring delegates to a set of keyrings.