Documentation
¶
Index ¶
- Constants
- func GetCertificate(chi *tls.ClientHelloInfo, tokenOnly bool) (*tls.Certificate, error)
- func HandleHTTP01Challenge(w http.ResponseWriter, r *http.Request)
- type AutoCertManager
- func (acm *AutoCertManager) Category() supervisor.ObjectCategory
- func (acm *AutoCertManager) Close()
- func (acm *AutoCertManager) DefaultSpec() interface{}
- 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. // It is a business controller by now, but should be a system controller. Category = supervisor.CategoryBusinessController // Kind is the kind of AutoCertManager. Kind = "AutoCertManager" )
Variables ¶
This section is empty.
Functions ¶
func GetCertificate ¶
func GetCertificate(chi *tls.ClientHelloInfo, tokenOnly bool) (*tls.Certificate, error)
GetCertificate handles the tls hello
func HandleHTTP01Challenge ¶
func HandleHTTP01Challenge(w http.ResponseWriter, r *http.Request)
HandleHTTP01Challenge handles HTTP-01 challenge
Types ¶
type AutoCertManager ¶
type AutoCertManager struct {
// contains filtered or unexported fields
}
AutoCertManager is the controller for Automated Certificate Management.
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) 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 `yaml:"name"` ExpireTime time.Time `yaml:"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 `yaml:"name" jsonschema:"required"` DNSProvider map[string]string `yaml:"dnsProvider" jsonschema:"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 `yaml:"directoryURL" jsonschema:"required,format=url"` Email string `yaml:"email" jsonschema:"required,format=email"` RenewBefore string `yaml:"renewBefore" jsonschema:"required,format=duration"` EnableHTTP01 bool `yaml:"enableHTTP01"` EnableTLSALPN01 bool `yaml:"enableTLSALPN01"` EnableDNS01 bool `yaml:"enableDNS01"` Domains []DomainSpec `yaml:"domains" jsonschema:"required"` }
Spec describes AutoCertManager.
type Status ¶
type Status struct {
Domains []CertificateStatus `yaml:"domains"`
}
Status is the status of AutoCertManager.