2018-03-05 19:54:04 +00:00
|
|
|
package acme
|
|
|
|
|
2019-07-19 09:52:04 +00:00
|
|
|
// StoredData represents the data managed by Store.
|
2018-03-05 19:54:04 +00:00
|
|
|
type StoredData struct {
|
2019-07-19 09:52:04 +00:00
|
|
|
Account *Account
|
|
|
|
Certificates []*CertAndStore
|
|
|
|
}
|
|
|
|
|
|
|
|
// Store is a generic interface that represents a storage.
|
2018-03-05 19:54:04 +00:00
|
|
|
type Store interface {
|
2019-07-19 09:52:04 +00:00
|
|
|
GetAccount(string) (*Account, error)
|
|
|
|
SaveAccount(string, *Account) error
|
|
|
|
GetCertificates(string) ([]*CertAndStore, error)
|
|
|
|
SaveCertificates(string, []*CertAndStore) error
|
|
|
|
}
|