forked from docker/machine
/
store.go
28 lines (27 loc) · 952 Bytes
/
store.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package libmachine
type Store interface {
// Exists returns whether a machine exists or not
Exists(name string) (bool, error)
// GetActive returns the active host
GetActive() (*Host, error)
// GetPath returns the path to the store
GetPath() string
// GetCACertPath returns the CA certificate
GetCACertificatePath() (string, error)
// GetPrivateKeyPath returns the private key
GetPrivateKeyPath() (string, error)
// IsActive returns whether the host is active or not
IsActive(host *Host) (bool, error)
// List returns a list of hosts
List() ([]*Host, error)
// Load loads a host by name
Get(name string) (*Host, error)
// Remove removes a machine from the store
Remove(name string, force bool) error
// RemoveActive removes the active machine from the store
RemoveActive() error
// Save persists a machine in the store
Save(host *Host) error
// SetActive sets the specified host as the active host
SetActive(host *Host) error
}