2017-12-11 14:50:55 -05:00
|
|
|
package credentials
|
|
|
|
|
|
|
|
import (
|
2019-09-16 16:36:44 -04:00
|
|
|
"github.com/docker/cli/cli/config/types"
|
2017-12-11 14:50:55 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// Store is the interface that any credentials store must implement.
|
|
|
|
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
|
|
|
|
}
|