autocertmanager

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package autocertmanager provides AutoCertManager to manage certificates automatically.

Index

Constants

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

func (*Spec) Validate

func (spec *Spec) Validate() error

Validate validates the spec of AutoCertManager.

type Status

type Status struct {
	Domains []CertificateStatus `json:"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