traefik/provider/acme/store.go

25 lines
732 B
Go
Raw Normal View History

2018-03-05 19:54:04 +00:00
package acme
// StoredData represents the data managed by the Store
type StoredData struct {
Account *Account
Certificates []*Certificate
HTTPChallenges map[string]map[string][]byte
2018-07-03 10:44:04 +00:00
TLSChallenges map[string]*Certificate
2018-03-05 19:54:04 +00:00
}
// Store is a generic interface to represents a storage
type Store interface {
GetAccount() (*Account, error)
SaveAccount(*Account) error
GetCertificates() ([]*Certificate, error)
SaveCertificates([]*Certificate) error
2018-07-03 10:44:04 +00:00
2018-03-05 19:54:04 +00:00
GetHTTPChallenges() (map[string]map[string][]byte, error)
SaveHTTPChallenges(map[string]map[string][]byte) error
2018-07-03 10:44:04 +00:00
AddTLSChallenge(domain string, cert *Certificate) error
GetTLSChallenge(domain string) (*Certificate, error)
RemoveTLSChallenge(domain string) error
2018-03-05 19:54:04 +00:00
}