traefik-certs-dumper/dumper/v2/storeddata.go
2019-09-30 12:53:37 +02:00

36 lines
921 B
Go

package v2
import (
"github.com/go-acme/lego/v3/certcrypto"
"github.com/go-acme/lego/v3/registration"
)
// StoredData represents the data managed by the Store
type StoredData struct {
Account *Account
Certificates []*Certificate
HTTPChallenges map[string]map[string][]byte
TLSChallenges map[string]*Certificate
}
// Certificate is a struct which contains all data needed from an ACME certificate
type Certificate struct {
Domain Domain `json:"domain,omitempty"`
Certificate []byte `json:"certificate,omitempty"`
Key []byte `json:"key,omitempty"`
}
// Domain holds a domain name with SANs
type Domain struct {
Main string `json:"main,omitempty"`
SANs []string `json:"sans,omitempty"`
}
// Account is used to store lets encrypt registration info
type Account struct {
Email string
Registration *registration.Resource
PrivateKey []byte
KeyType certcrypto.KeyType
}