2018-10-08 16:11:19 -04:00
|
|
|
package acme
|
|
|
|
|
2019-07-29 10:54:32 -04:00
|
|
|
import "github.com/go-acme/lego/certificate"
|
2018-10-08 16:11:19 -04:00
|
|
|
|
2018-10-09 18:51:48 -04:00
|
|
|
// Storage is an abstracrion around how certificates, keys, and account info are stored on disk or elsewhere.
|
2018-10-08 16:11:19 -04:00
|
|
|
type Storage interface {
|
|
|
|
// Get Existing certificate, or return nil if it does not exist
|
2019-07-29 10:54:32 -04:00
|
|
|
GetCertificate(name string) (*certificate.Resource, error)
|
|
|
|
StoreCertificate(name string, cert *certificate.Resource) error
|
2018-10-08 16:11:19 -04:00
|
|
|
|
|
|
|
GetAccount(acmeHost string) (*Account, error)
|
|
|
|
StoreAccount(acmeHost string, account *Account) error
|
|
|
|
}
|