Documentation
¶
Index ¶
- func BuildEnvVar(keychain authn.Keychain, images ...string) (string, error)
- func NewKeychain(envVar string) authn.Keychain
- func ReadEnvVar(envVar string) (map[string]string, error)
- func ReferenceForRepoName(keychain authn.Keychain, ref string) (name.Reference, authn.Authenticator, error)
- type EnvKeychain
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildEnvVar ¶
BuildEnvVar creates the contents to use for authentication environment variable.
Complementary to `ReadEnvVar`.
func NewKeychain ¶ added in v0.7.5
NewKeychain returns either a EnvKeychain or a authn.DefaultKeychain depending on whether the provided environment variable is set
func ReadEnvVar ¶
ReadEnvVar parses an environment variable to produce a map of 'registry url' to 'authorization header'.
Complementary to `BuildEnvVar`.
Example Input:
{"gcr.io": "Bearer asdf=", "docker.io": "Basic qwerty="}
Example Output:
gcr.io -> Bearer asdf= docker.io -> Basic qwerty=
func ReferenceForRepoName ¶
Types ¶
type EnvKeychain ¶
type EnvKeychain struct {
EnvVar string
}
EnvKeychain uses the contents of an environment variable to resolve auth for a registry
func (*EnvKeychain) Resolve ¶ added in v0.7.5
func (k *EnvKeychain) Resolve(resource authn.Resource) (authn.Authenticator, error)
Click to show internal directories.
Click to hide internal directories.