package credentials
import "github.com/docker/cli/cli/config/credentials"
Index ¶
- func ConvertToHostname(maybeURL string) string
- func DetectDefaultStore(store string) string
- type Store
Functions ¶
func ConvertToHostname ¶
ConvertToHostname converts a registry url which has http|https prepended to just an hostname. Copied from github.com/docker/docker/registry.ConvertToHostname to reduce dependencies.
func DetectDefaultStore ¶
DetectDefaultStore return the default credentials store for the platform if no user-defined store is passed, and the store executable is available.
Types ¶
type Store ¶
type Store interface { // Erase removes credentials from the store for a given server. Erase(serverAddress string) error // Get retrieves credentials from the store for a given server. Get(serverAddress string) (types.AuthConfig, error) // GetAll retrieves all the credentials from the store. GetAll() (map[string]types.AuthConfig, error) // Store saves credentials in the store. Store(authConfig types.AuthConfig) error }
Store is the interface that any credentials store must implement.
func NewFileStore ¶
func NewFileStore(file store) Store
NewFileStore creates a new file credentials store.
func NewNativeStore ¶
NewNativeStore creates a new native store that uses a remote helper program to manage credentials.
Source Files ¶
credentials.go default_store.go default_store_windows.go file_store.go native_store.go
- Version
- v28.0.4+incompatible
- Published
- Mar 25, 2025
- Platform
- windows/amd64
- Imports
- 10 packages
- Last checked
- 2 hours ago –
Tools for package owners.