acme

package
v0.0.0-...-d687121 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

implementation is adopted from https://github.com/joohoi/acme-dns/blob/master/dns.go

Index

Constants

This section is empty.

Variables

View Source
var (
	BuildTime = "now"
)
View Source
var (
	ErrInvalid = fmt.Errorf("acme: invalid hostname")
)

Functions

func AcmeManagerHandler

func AcmeManagerHandler(m *Manager) http.Handler

Types

type ChordSolver

type ChordSolver struct {
	KV             chord.KV
	ManagedDomains []string
}

func (*ChordSolver) CleanUp

func (s *ChordSolver) CleanUp(ctx context.Context, chal acme.Challenge) error

func (*ChordSolver) Present

func (s *ChordSolver) Present(ctx context.Context, chal acme.Challenge) error

type ChordStorage

type ChordStorage struct {
	Logger *zap.Logger
	KV     chord.KV
	// contains filtered or unexported fields
}

func NewChordStorage

func NewChordStorage(logger *zap.Logger, kv chord.KV, cfg StorageConfig) (*ChordStorage, error)

func (*ChordStorage) Delete

func (c *ChordStorage) Delete(ctx context.Context, key string) error

func (*ChordStorage) Exists

func (c *ChordStorage) Exists(ctx context.Context, key string) bool

func (*ChordStorage) List

func (c *ChordStorage) List(ctx context.Context, prefix string, recursive bool) ([]string, error)

func (*ChordStorage) Load

func (c *ChordStorage) Load(ctx context.Context, key string) ([]byte, error)

func (*ChordStorage) Lock

func (c *ChordStorage) Lock(ctx context.Context, key string) error

func (*ChordStorage) Stat

func (c *ChordStorage) Stat(ctx context.Context, key string) (certmagic.KeyInfo, error)

func (*ChordStorage) Store

func (c *ChordStorage) Store(ctx context.Context, key string, value []byte) error

func (*ChordStorage) Unlock

func (c *ChordStorage) Unlock(ctx context.Context, key string) error

type DNS

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

func NewDNS

func NewDNS(ctx context.Context, logger *zap.Logger, kv chord.KV, email, domain string, ns map[string][]string) *DNS

func (*DNS) ServeDNS

func (d *DNS) ServeDNS(w dns.ResponseWriter, r *dns.Msg)

type Manager

type Manager struct {
	ManagerConfig
	// contains filtered or unexported fields
}

func NewManager

func NewManager(cfg ManagerConfig) (*Manager, error)

func (*Manager) GetCertificate

func (m *Manager) GetCertificate(chi *tls.ClientHelloInfo) (*tls.Certificate, error)

func (*Manager) Initialize

func (m *Manager) Initialize(ctx context.Context) error

func (*Manager) OnHandshake

func (m *Manager) OnHandshake(fn cipher.OnHandshakeFunc)

type ManagerConfig

type ManagerConfig struct {
	Logger         *zap.Logger
	KV             chord.KV
	DNSSolver      acmez.Solver
	ManagedDomains []string
	CA             string
	Email          string
	// contains filtered or unexported fields
}

type StorageConfig

type StorageConfig struct {
	RetryInterval time.Duration
	LeaseTTL      time.Duration
}

Jump to

Keyboard shortcuts

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