Documentation ¶
Index ¶
- Variables
- type ACME
- func (a *ACME) AddRoutes(router *mux.Router)
- func (a *ACME) CreateClusterConfig(leadership *cluster.Leadership, tlsConfig *tls.Config, certs *safe.Safe, ...) error
- func (a *ACME) CreateLocalConfig(tlsConfig *tls.Config, certs *safe.Safe, ...) error
- func (a *ACME) LoadCertificateForDomains(domains []string)
- type Account
- type Certificate
- type ChallengeCert
- type DNSChallenge
- type Domain
- type Domains
- type DomainsCertificate
- type DomainsCertificates
- type HTTPChallenge
- type LocalStore
Constants ¶
This section is empty.
Variables ¶
var ( // OSCPMustStaple enables OSCP stapling as from https://github.com/xenolf/lego/issues/270 OSCPMustStaple = false )
Functions ¶
This section is empty.
Types ¶
type ACME ¶
type ACME struct { Email string `description:"Email address used for registration"` Domains []Domain `` /* 162-byte string literal not displayed */ Storage string `description:"File or key used for certificates storage."` StorageFile string // deprecated OnDemand bool `` //deprecated /* 189-byte string literal not displayed */ OnHostRule bool `description:"Enable certificate generation on frontends Host rules."` CAServer string `description:"CA server to use."` EntryPoint string `description:"Entrypoint to proxy acme challenge to."` DNSChallenge *DNSChallenge `description:"Activate DNS-01 Challenge"` HTTPChallenge *HTTPChallenge `description:"Activate HTTP-01 Challenge"` DNSProvider string `description:"Use a DNS-01 acme challenge rather than TLS-SNI-01 challenge."` // deprecated DelayDontCheckDNS flaeg.Duration `description:"Assume DNS propagates after a delay in seconds rather than finding and querying nameservers."` // deprecated ACMELogging bool `description:"Enable debug logging of ACME actions."` TLSConfig *tls.Config `description:"TLS config in case wildcard certs are used"` // contains filtered or unexported fields }
ACME allows to connect to lets encrypt and retrieve certs
func (*ACME) CreateClusterConfig ¶ added in v1.1.0
func (a *ACME) CreateClusterConfig(leadership *cluster.Leadership, tlsConfig *tls.Config, certs *safe.Safe, checkOnDemandDomain func(domain string) bool) error
CreateClusterConfig creates a tls.config using ACME configuration in cluster mode
func (*ACME) CreateLocalConfig ¶ added in v1.1.0
func (a *ACME) CreateLocalConfig(tlsConfig *tls.Config, certs *safe.Safe, checkOnDemandDomain func(domain string) bool) error
CreateLocalConfig creates a tls.config using local ACME configuration
func (*ACME) LoadCertificateForDomains ¶ added in v1.1.0
LoadCertificateForDomains loads certificates from ACME for given domains
type Account ¶
type Account struct { Email string Registration *acme.RegistrationResource PrivateKey []byte DomainsCertificate DomainsCertificates ChallengeCerts map[string]*ChallengeCert HTTPChallenge map[string]map[string][]byte }
Account is used to store lets encrypt registration info
func NewAccount ¶ added in v1.1.0
NewAccount creates an account
func (*Account) GetPrivateKey ¶
func (a *Account) GetPrivateKey() crypto.PrivateKey
GetPrivateKey returns private key
func (*Account) GetRegistration ¶
func (a *Account) GetRegistration() *acme.RegistrationResource
GetRegistration returns lets encrypt registration resource
type Certificate ¶
type Certificate struct { Domain string CertURL string CertStableURL string PrivateKey []byte Certificate []byte }
Certificate is used to store certificate info
type ChallengeCert ¶ added in v1.1.0
type ChallengeCert struct { Certificate []byte PrivateKey []byte // contains filtered or unexported fields }
ChallengeCert stores a challenge certificate
type DNSChallenge ¶ added in v1.5.0
type DNSChallenge struct { Provider string `description:"Use a DNS-01 based challenge provider rather than HTTPS."` DelayBeforeCheck flaeg.Duration `description:"Assume DNS propagates after a delay in seconds rather than finding and querying nameservers."` }
DNSChallenge contains DNS challenge Configuration
type Domains ¶
type Domains []Domain
Domains parse []Domain
type DomainsCertificate ¶
type DomainsCertificate struct { Domains Domain Certificate *Certificate // contains filtered or unexported fields }
DomainsCertificate contains a certificate for multiple domains
type DomainsCertificates ¶
type DomainsCertificates struct { Certs []*DomainsCertificate // contains filtered or unexported fields }
DomainsCertificates stores a certificate for multiple domains
func (*DomainsCertificates) Init ¶ added in v1.1.0
func (dc *DomainsCertificates) Init() error
Init inits DomainsCertificates
func (*DomainsCertificates) Len ¶ added in v1.1.2
func (dc *DomainsCertificates) Len() int
func (*DomainsCertificates) Less ¶ added in v1.1.2
func (dc *DomainsCertificates) Less(i, j int) bool
func (*DomainsCertificates) Swap ¶ added in v1.1.2
func (dc *DomainsCertificates) Swap(i, j int)
type HTTPChallenge ¶ added in v1.5.0
type HTTPChallenge struct {
EntryPoint string `description:"HTTP challenge EntryPoint"`
}
HTTPChallenge contains HTTP challenge Configuration
type LocalStore ¶ added in v1.1.0
type LocalStore struct {
// contains filtered or unexported fields
}
LocalStore is a store using a file as storage
func NewLocalStore ¶ added in v1.1.0
func NewLocalStore(file string) *LocalStore
NewLocalStore create a LocalStore
func (*LocalStore) Begin ¶ added in v1.1.0
func (s *LocalStore) Begin() (cluster.Transaction, cluster.Object, error)
Begin creates a transaction with the KV store.
func (*LocalStore) Get ¶ added in v1.1.0
func (s *LocalStore) Get() cluster.Object
Get atomically a struct from the file storage