renewal

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DomainStateNormal  = 0
	DomainStateAdded   = 1
	DomainStateRemoved = 2
)

Variables

View Source
var ErrAlreadyRenewing = errors.New("already renewing")
View Source
var (
	ErrUnsupportedDNSProvider = errors.New("unsupported DNS provider")
)

Functions

This section is empty.

Types

type Account

type Account struct {
	// contains filtered or unexported fields
}

Account stores the information required for the lego library to use the LetsEncrypt account details.

func (*Account) GetEmail

func (a *Account) GetEmail() string

func (*Account) GetPrivateKey

func (a *Account) GetPrivateKey() crypto.PrivateKey

func (*Account) GetRegistration

func (a *Account) GetRegistration() *registration.Resource

type LetsEncryptAccount

type LetsEncryptAccount struct {
	Email      string `yaml:"email"`
	PrivateKey string `yaml:"key"`
}

type LetsEncryptConfig

type LetsEncryptConfig struct {
	Account     LetsEncryptAccount `yaml:"account"`
	Directory   string             `yaml:"directory"`
	Certificate string             `yaml:"certificate"`
	// contains filtered or unexported fields
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service manages the scheduled renewal of certificates stored in the database and outputs the latest certificates to the certDir folder. If the certificate does not have a key already defined in keyDir then a new key is generated.

The service makes use of an HTTP ACME challenge provider, and a DNS ACME challenge provider. These ensure the `.wellknown/acme-challenges` files and `_acme-challenges` TXT records are updated to validate the ownership of the specified domains.

func NewService

func NewService(wg *sync.WaitGroup, db *sql.DB, httpAcme challenge.Provider, leConfig LetsEncryptConfig, certDir, keyDir string) (*Service, error)

NewService creates a new certificate renewal service.

func (*Service) Shutdown

func (s *Service) Shutdown()

Shutdown the renewal service.

Jump to

Keyboard shortcuts

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