autocertmanager

package
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
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) Close

func (acm *AutoCertManager) Close()

Close closes 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.

func (*Spec) Validate

func (spec *Spec) Validate() error

Validate validates the spec of AutoCertManager.

type Status

type Status struct {
	Domains []CertificateStatus `yaml:"domains"`
}

Status is the status of AutoCertManager.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL