Documentation
¶
Index ¶
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 string) string
CreatePullSecretYAMLFromCredentials creates Kubernetes pull secret YAML from verified credentials.
func (*DockerAuth) GetAndVerifyCredentials ¶
func (d *DockerAuth) GetAndVerifyCredentials() (*Credentials, error)
GetAndVerifyCredentials retrieves and verifies Docker credentials. This should be called early to fail fast if credentials are invalid.
func (*DockerAuth) VerifyCredentials ¶
func (d *DockerAuth) VerifyCredentials(username, password string) error
VerifyCredentials attempts to verify that the credentials work by making a request to the registry. This uses a read-only HTTP request. It mimics what the kubelet would do when pulling images.