Documentation
¶
Index ¶
- Constants
- Variables
- type AutocertConfig
- type CertExpiries
- type CertState
- type DummyConfig
- type DummyProvider
- type Provider
- func (p *Provider) GetCert(_ *tls.ClientHelloInfo) (*tls.Certificate, error)
- func (p *Provider) GetCertPath() string
- func (p *Provider) GetExpiries() CertExpiries
- func (p *Provider) GetKeyPath() string
- func (p *Provider) GetName() string
- func (p *Provider) LoadCert() error
- func (p *Provider) ObtainCert() error
- func (p *Provider) ScheduleRenewal(parent task.Parent)
- func (p *Provider) Setup() (err error)
- func (p *Provider) ShouldRenewOn() time.Time
- type ProviderGenerator
- type ProviderOpt
- type User
Constants ¶
View Source
const ( CertFileDefault = certBasePath + "cert.crt" KeyFileDefault = certBasePath + "priv.key" ACMEKeyFileDefault = certBasePath + "acme.key" )
View Source
const ( ProviderLocal = "local" ProviderCloudflare = "cloudflare" ProviderClouddns = "clouddns" ProviderDuckdns = "duckdns" ProviderOVH = "ovh" ProviderPseudo = "pseudo" // for testing ProviderPorkbun = "porkbun" )
Variables ¶
View Source
var ( ErrMissingDomain = gperr.New("missing field 'domains'") ErrMissingEmail = gperr.New("missing field 'email'") ErrMissingProvider = gperr.New("missing field 'provider'") ErrInvalidDomain = gperr.New("invalid domain") ErrUnknownProvider = gperr.New("unknown provider") )
View Source
var ErrGetCertFailure = errors.New("get certificate failed")
Functions ¶
This section is empty.
Types ¶
type AutocertConfig ¶
type AutocertConfig struct { Email string `json:"email,omitempty"` Domains []string `json:"domains,omitempty"` CertPath string `json:"cert_path,omitempty"` KeyPath string `json:"key_path,omitempty"` ACMEKeyPath string `json:"acme_key_path,omitempty"` Provider string `json:"provider,omitempty"` Options ProviderOpt `json:"options,omitempty"` }
func (*AutocertConfig) GetProvider ¶
func (cfg *AutocertConfig) GetProvider() (*Provider, gperr.Error)
func (*AutocertConfig) Validate ¶
func (cfg *AutocertConfig) Validate() gperr.Error
Validate implements the utils.CustomValidator interface.
type CertExpiries ¶
type DummyConfig ¶
type DummyConfig struct{}
func NewDummyDefaultConfig ¶
func NewDummyDefaultConfig() *DummyConfig
type DummyProvider ¶
type DummyProvider struct{}
func NewDummyDNSProviderConfig ¶
func NewDummyDNSProviderConfig(*DummyConfig) (*DummyProvider, error)
func (DummyProvider) CleanUp ¶
func (DummyProvider) CleanUp(domain, token, keyAuth string) error
func (DummyProvider) Present ¶
func (DummyProvider) Present(domain, token, keyAuth string) error
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) GetCert ¶
func (p *Provider) GetCert(_ *tls.ClientHelloInfo) (*tls.Certificate, error)
func (*Provider) GetCertPath ¶
func (*Provider) GetExpiries ¶
func (p *Provider) GetExpiries() CertExpiries
func (*Provider) GetKeyPath ¶
func (*Provider) ObtainCert ¶
func (*Provider) ScheduleRenewal ¶
func (*Provider) ShouldRenewOn ¶
ShouldRenewOn returns the time at which the certificate should be renewed.
type ProviderGenerator ¶
type ProviderGenerator func(ProviderOpt) (challenge.Provider, gperr.Error)
type ProviderOpt ¶
type User ¶
type User struct { Email string Registration *registration.Resource // contains filtered or unexported fields }
func (*User) GetPrivateKey ¶
func (u *User) GetPrivateKey() crypto.PrivateKey
func (*User) GetRegistration ¶
func (u *User) GetRegistration() *registration.Resource
Click to show internal directories.
Click to hide internal directories.