2016-02-08 00:55:17 +00:00
|
|
|
package credentials
|
|
|
|
|
|
|
|
import (
|
2016-09-06 18:18:12 +00:00
|
|
|
"github.com/docker/docker/api/types"
|
2016-02-08 00:55:17 +00: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)
|
2016-03-01 17:04:35 +00:00
|
|
|
// GetAll retrieves all the credentials from the store.
|
|
|
|
GetAll() (map[string]types.AuthConfig, error)
|
2016-02-08 00:55:17 +00:00
|
|
|
// Store saves credentials in the store.
|
|
|
|
Store(authConfig types.AuthConfig) error
|
|
|
|
}
|