acme

package
v0.0.0-...-93d971c Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2017 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotMasterError = errgo.New("not master")
)

Functions

func IsNotMaster

func IsNotMaster(err error) bool

Types

type AcmeService

type AcmeService interface {
	Register() error
	Start() error
	Extend(services backend.ServiceRegistrations) (backend.ServiceRegistrations, error)
}

func NewAcmeService

func NewAcmeService(config AcmeServiceConfig, deps AcmeServiceDependencies) AcmeService

NewAcmeService creates and initializes a new AcmeService implementation.

type AcmeServiceConfig

type AcmeServiceConfig struct {
	HttpProviderConfig

	EtcdPrefix       string // Folder in ETCD to use ACME
	CADirectoryURL   string // URL of ACME directory
	KeyBits          int    // Size of generated keys (in bits)
	Email            string // Registration email address
	PrivateKeyPath   string // Path of file containing private key
	RegistrationPath string // Path of file containing acme.RegistrationResource
}

type AcmeServiceDependencies

type AcmeServiceDependencies struct {
	HttpProviderDependencies

	Listener   AcmeServiceListener
	Repository CertificatesRepository
	Cache      CertificatesFileCache
	Renewal    RenewalMonitor
	Requester  CertificateRequester
}

type AcmeServiceListener

type AcmeServiceListener interface {
	CertificatesUpdated() // Called when there is a change in one of the ACME generated certificates.
}

type CertificateRequester

type CertificateRequester interface {
	Initialize(acmeClient *acme.Client)
	RequestCertificates(domains []string) error
}

func NewCertificateRequester

func NewCertificateRequester(logger *logging.Logger, repository CertificatesRepository, mutexService mutex.GlobalMutexService) CertificateRequester

type CertificatesFileCache

type CertificatesFileCache interface {
	Clear()

	// GetDomainCertificatePath returns the path of a certificate file for the given domain.
	GetDomainCertificatePath(domain string) (string, error)
}

func NewCertificatesFileCache

func NewCertificatesFileCache(tmpPath string, repository CertificatesRepository, logger *logging.Logger) CertificatesFileCache

type CertificatesRepository

type CertificatesRepository interface {
	WatchDomainCertificates() error

	// loadDomainCertificate tries to load the certificate for the given domain from the ETCD repository
	// Returns nil,nil if domain is not found.
	LoadDomainCertificate(domain string) ([]byte, error)

	// storeDomainCertificate stores the certificate for the given domain in the ETCD repository
	StoreDomainCertificate(domain string, certificate []byte) error
}

func NewEtcdCertificatesRepository

func NewEtcdCertificatesRepository(etcdPrefix string, etcdClient client.Client) CertificatesRepository

type HttpProviderConfig

type HttpProviderConfig struct {
	EtcdPrefix string // Folder in ETCD to use for Http challenges
	Port       int    // Port to listen on
}

type HttpProviderDependencies

type HttpProviderDependencies struct {
	Logger     *logging.Logger
	EtcdClient client.Client
}

type RenewalMonitor

type RenewalMonitor interface {
	SetUsedDomains(domains []string)
	Start()
}

func NewRenewalMonitor

func NewRenewalMonitor(logger *logging.Logger, repository CertificatesRepository, requester CertificateRequester) RenewalMonitor

Jump to

Keyboard shortcuts

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