Documentation
¶
Index ¶
- type AuthEntry
- type CredentialData
- type Credentials
- type DockerAuth
- func (d *DockerAuth) CreatePullSecretYAMLFromCredentials(creds Credentials, namespace, registry string) string
- func (d *DockerAuth) GetAndVerifyCredentials(ctx context.Context, registry string) (*Credentials, error)
- func (d *DockerAuth) RepositoryRequiresAuth(ctx context.Context, repository string) (bool, error)
- type DockerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthEntry ¶
type AuthEntry struct {
Auth string `json:"auth,omitempty"`
}
AuthEntry represents a single auth entry in Docker config.
type CredentialData ¶
CredentialData represents credential data from credential helper.
type Credentials ¶
Credentials represents verified Docker credentials.
type DockerAuth ¶
type DockerAuth struct {
// contains filtered or unexported fields
}
DockerAuth handles Docker authentication and pull secret management.
func (*DockerAuth) CreatePullSecretYAMLFromCredentials ¶
func (d *DockerAuth) CreatePullSecretYAMLFromCredentials(creds Credentials, namespace, registry string) string
CreatePullSecretYAMLFromCredentials creates Kubernetes pull secret YAML from verified credentials, scoped to the host of the given image registry
func (*DockerAuth) GetAndVerifyCredentials ¶
func (d *DockerAuth) GetAndVerifyCredentials(ctx context.Context, registry string) (*Credentials, error)
GetAndVerifyCredentials retrieves and verifies Docker credentials. This should be called early to fail fast if credentials are invalid.
func (*DockerAuth) RepositoryRequiresAuth ¶ added in v0.4.12
RepositoryRequiresAuth makes a best-effort check for whether the given repository requires authentication, by sending a single anonymous tags-list request. Anything short of a confirmed successful response fails safe by reporting that auth is required, alongside an error explaining why the check was inconclusive.