Documentation
¶
Index ¶
- Constants
- Variables
- type CertExpiries
- type CertState
- type Config
- type Generator
- 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 User
Constants ¶
View Source
const ( ProviderLocal = "local" ProviderPseudo = "pseudo" )
View Source
const ( CertFileDefault = certBasePath + "cert.crt" KeyFileDefault = certBasePath + "priv.key" ACMEKeyFileDefault = certBasePath + "acme.key" )
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")
View Source
var Providers = make(map[string]Generator)
Functions ¶
This section is empty.
Types ¶
type CertExpiries ¶
type Config ¶ added in v0.11.2
type Config 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 map[string]any `json:"options,omitempty"` }
func (*Config) GetLegoConfig ¶ added in v0.11.2
func (*Config) LoadACMEKey ¶ added in v0.11.2
func (cfg *Config) LoadACMEKey() (*ecdsa.PrivateKey, error)
func (*Config) SaveACMEKey ¶ added in v0.11.2
func (cfg *Config) SaveACMEKey(key *ecdsa.PrivateKey) error
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func NewProvider ¶ added in v0.11.2
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 User ¶
type User struct { Email string Registration *registration.Resource Key crypto.PrivateKey }
func (*User) GetPrivateKey ¶
func (u *User) GetPrivateKey() crypto.PrivateKey
func (*User) GetRegistration ¶
func (u *User) GetRegistration() *registration.Resource
Source Files
¶
Click to show internal directories.
Click to hide internal directories.