Documentation ¶
Overview ¶
Package autocertmanager provides AutoCertManager to manage certificates automatically.
Index ¶
- Constants
- type AutoCertManager
- func (acm *AutoCertManager) Category() supervisor.ObjectCategory
- func (acm *AutoCertManager) Close()
- func (acm *AutoCertManager) DefaultSpec() interface{}
- func (acm *AutoCertManager) GetCertificate(chi *tls.ClientHelloInfo, tokenOnly bool) (*tls.Certificate, error)
- func (acm *AutoCertManager) HandleHTTP01Challenge(w http.ResponseWriter, r *http.Request)
- func (acm *AutoCertManager) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
- func (acm *AutoCertManager) Init(superSpec *supervisor.Spec)
- func (acm *AutoCertManager) Kind() string
- func (acm *AutoCertManager) Status() *supervisor.Status
- type CertificateStatus
- type Domain
- type DomainSpec
- type Spec
- type Status
Constants ¶
const ( // Category is the category of AutoCertManager. Category = supervisor.CategoryBusinessController // Kind is the kind of AutoCertManager. Kind = "AutoCertManager" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoCertManager ¶
type AutoCertManager struct {
// contains filtered or unexported fields
}
AutoCertManager is the controller for Automated Certificate Management.
func GetGlobalAutoCertManager ¶ added in v2.7.0
func GetGlobalAutoCertManager() (*AutoCertManager, bool)
func (*AutoCertManager) Category ¶
func (acm *AutoCertManager) Category() supervisor.ObjectCategory
Category returns the category of AutoCertManager.
func (*AutoCertManager) DefaultSpec ¶
func (acm *AutoCertManager) DefaultSpec() interface{}
DefaultSpec returns the default spec of AutoCertManager.
func (*AutoCertManager) GetCertificate ¶ added in v2.7.0
func (acm *AutoCertManager) GetCertificate(chi *tls.ClientHelloInfo, tokenOnly bool) (*tls.Certificate, error)
GetCertificate handles the tls hello.
func (*AutoCertManager) HandleHTTP01Challenge ¶ added in v2.7.0
func (acm *AutoCertManager) HandleHTTP01Challenge(w http.ResponseWriter, r *http.Request)
HandleHTTP01Challenge handles HTTP-01 challenge.
func (*AutoCertManager) Inherit ¶
func (acm *AutoCertManager) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
Inherit inherits previous generation of AutoCertManager.
func (*AutoCertManager) Init ¶
func (acm *AutoCertManager) Init(superSpec *supervisor.Spec)
Init initializes AutoCertManager.
func (*AutoCertManager) Kind ¶
func (acm *AutoCertManager) Kind() string
Kind return the kind of AutoCertManager.
func (*AutoCertManager) Status ¶
func (acm *AutoCertManager) Status() *supervisor.Status
Status returns the status of AutoCertManager.
type CertificateStatus ¶
type CertificateStatus struct { Name string `json:"name"` ExpireTime time.Time `json:"expireTime"` }
CertificateStatus is the certificate status of a domain.
type Domain ¶
type Domain struct { *DomainSpec // contains filtered or unexported fields }
Domain represents a domain for automated certificate management
type DomainSpec ¶
type DomainSpec struct { Name string `json:"name" jsonschema:"required"` DNSProvider map[string]string `json:"dnsProvider,omitempty"` }
DomainSpec is the automated certificate management spec for a domain.
func (*DomainSpec) Zone ¶
func (spec *DomainSpec) Zone() string
Zone returns the zone the domain belongs to.
type Spec ¶
type Spec struct { DirectoryURL string `json:"directoryURL" jsonschema:"required,format=url"` Email string `json:"email" jsonschema:"required,format=email"` RenewBefore string `json:"renewBefore" jsonschema:"required,format=duration"` EnableHTTP01 bool `json:"enableHTTP01"` EnableTLSALPN01 bool `json:"enableTLSALPN01"` EnableDNS01 bool `json:"enableDNS01"` Domains []DomainSpec `json:"domains" jsonschema:"required"` }
Spec describes AutoCertManager.
type Status ¶
type Status struct {
Domains []CertificateStatus `json:"domains"`
}
Status is the status of AutoCertManager.