Documentation ¶
Overview ¶
Package traefik handles reading and parsing acme.json files from Traefik.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCertificateResolverNotFound = errors.New("certificate resolver not found")
ErrCertificateResolverNotFound is returned when the specified certificate resolver is not found.
Functions ¶
func GetKeyType ¶
func GetKeyType(ctx context.Context, value string) certcrypto.KeyType
GetKeyType used to determine which algo to used.
Types ¶
type Account ¶
type Account struct { Email string Registration *registration.Resource PrivateKey []byte KeyType certcrypto.KeyType }
Account is used to store lets encrypt registration info.
func (*Account) GetPrivateKey ¶
func (a *Account) GetPrivateKey() crypto.PrivateKey
GetPrivateKey returns private key.
func (*Account) GetRegistration ¶
func (a *Account) GetRegistration() *registration.Resource
GetRegistration returns lets encrypt registration resource.
type Certificate ¶
type Certificate struct { Domain Domain `json:"domain"` Certificate []byte `json:"certificate"` Key []byte `json:"key"` }
Certificate is a struct which contains all data needed from an ACME certificate.
type Domain ¶
Domain holds a domain name with SANs.
func (*Domain) ToStrArray ¶
ToStrArray convert a domain into an array of strings.
type LocalNamedStore ¶
type LocalNamedStore struct { // Acme *LocalStore `json:"acme"` Account *Account `json:"Account"` Certificates []*Certificate `json:"Certificates"` HTTPChallenges map[string]map[string][]byte TLSChallenges map[string]*Certificate }
LocalNamedStore represents the data managed by the Store.
func ReadBytes ¶
func ReadBytes(data []byte, certificateResolver string) (*LocalNamedStore, error)
ReadBytes returns new LocalNamedStore from a byte slice.
func ReadFile ¶
func ReadFile(filename, certificateResolver string) (*LocalNamedStore, error)
ReadFile returns new LocalNamedStore from a filename.
func (*LocalNamedStore) GetAccount ¶
func (s *LocalNamedStore) GetAccount() *Account
GetAccount returns ACME Account.
func (*LocalNamedStore) GetCertificateByName ¶
func (s *LocalNamedStore) GetCertificateByName(name string) *Certificate
GetCertificateByName returns ACME Certificate matching supplied name.
func (*LocalNamedStore) GetCertificates ¶
func (s *LocalNamedStore) GetCertificates() []*Certificate
GetCertificates returns ACME Certificates list.
type LocalStore ¶
type LocalStore map[string]*LocalNamedStore
LocalStore represents the parent store.