certmanager

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateConfig

type CertificateConfig struct {
	Domain   string
	Email    string
	CA       string
	CacheDir string
}

CertificateConfig the config the user passes to the certificate manager

type CertificateData

type CertificateData struct {
	KeyPath  string
	CertPath string
	Fresh    bool
}

CertificateData the result of the generated certificate

type CertificateManager

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

CertificateManager manages certificate generation

func NewCertificateManager

func NewCertificateManager(config CertificateConfig) *CertificateManager

NewCertificateManager creates a new certificate manager with the given config

func (*CertificateManager) EnsureCertificate

func (c *CertificateManager) EnsureCertificate() (CertificateData, error)

EnsureCertificate checks the current certificate's expiry, and generates

a new one if no cert is found or its expiry date is less
than 30 day from now. And returns the certificate data.

func (CertificateManager) ListenForChallenges

func (c CertificateManager) ListenForChallenges() error

ListenForChallenges handles http cert verification requests and redirects

all other requests to https

type KeypairReloader

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

KeypairReloader to use with TLS servers for dynamic reloading

func NewKeypairReloader

func NewKeypairReloader(certManager *CertificateManager) (*KeypairReloader, error)

NewKeypairReloader creates a new instance given the manager to create certs

func (*KeypairReloader) GetCertificateFunc

func (kpr *KeypairReloader) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertificateFunc returns a function that returns the up-to-date certificate

type Provider

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

Provider to use for presenting tokens when generating certs

func (*Provider) CleanUp

func (p *Provider) CleanUp(domain, token, keyAuth string) error

CleanUp removes the token entry

func (*Provider) Present

func (p *Provider) Present(domain, token, keyAuth string) error

Present associates the token with keyAuth

Jump to

Keyboard shortcuts

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