boltCertificate

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(filename string, fileMode os.FileMode, boltOptions *bolt.Options) (db *bolt.DB, err error)

NewDB opens a new BoltDB database.

Types

type Logger added in v0.4.1

type Logger interface {
	Debug(a ...interface{})
	Info(a ...interface{})
	Infof(format string, a ...interface{})
	Warningf(format string, a ...interface{})
	Errorf(format string, a ...interface{})
}

Logger defines interface for logging messages with various severity levels.

type Service

type Service struct {
	DB *bolt.DB

	// Default ACME directory URL.
	DefaultACMEDirectoryURL string

	// RenewPeriod is a duration after issuing a certificate
	// to try to renew it.
	RenewPeriod time.Duration
	// RenewCheckPeriod is a period of renewal process.
	RenewCheckPeriod time.Duration

	// RecoveryService recovers from panics, and logs and informs about it.
	RecoveryService recovery.Service
	// Default logger for this service.
	Logger Logger
	// contains filtered or unexported fields
}

Service implements gopherpit.com/gopherpit/services/certificate.Service interface.

func (Service) ACMEChallenge

func (s Service) ACMEChallenge(fqdn string) (c *certificate.ACMEChallenge, err error)

ACMEChallenge returns an instance of ACMEChallenge for a FQDN.

func (Service) ACMEChallenges

func (s Service) ACMEChallenges(start string, limit int) (page *certificate.ACMEChallengesPage, err error)

ACMEChallenges retrieves a paginated list of ACMEChallenge instances.

func (Service) ACMEUser

func (s Service) ACMEUser() (u *certificate.ACMEUser, err error)

ACMEUser returns ACME user with ACME authentication details.

func (Service) Certificate

func (s Service) Certificate(fqdn string) (c *certificate.Certificate, err error)

Certificate returns a Certificate for provided FQDN.

func (Service) Certificates

func (s Service) Certificates(start string, limit int) (page *certificate.CertificatesPage, err error)

Certificates retrieves a paginated list of Certificate instances ordered by FQDN.

func (Service) CertificatesInfoByExpiry

func (s Service) CertificatesInfoByExpiry(since time.Time, start string, limit int) (page *certificate.InfosPage, err error)

CertificatesInfoByExpiry retrieves a paginated list of Info instances ordered by expiration time.

func (Service) DataDump added in v0.2.1

func (s Service) DataDump(ifModifiedSince *time.Time) (dump *dataDump.Dump, err error)

DataDump implements dataDump.Interface interface to extract database data in a safe and reliable way.

func (Service) DeleteACMEChallenge

func (s Service) DeleteACMEChallenge(fqdn string) (c *certificate.ACMEChallenge, err error)

DeleteACMEChallenge deletes an existing ACMEChallenge for a provided FQDN and returns it.

func (Service) DeleteCertificate

func (s Service) DeleteCertificate(fqdn string) (c *certificate.Certificate, err error)

DeleteCertificate deletes an existing Certificate for a provided FQDN and returns it.

func (Service) IsCertificateBeingObtained

func (s Service) IsCertificateBeingObtained(fqdn string) (yes bool, err error)

IsCertificateBeingObtained tests if certificate is being obtained currently.

func (Service) ObtainCertificate

func (s Service) ObtainCertificate(fqdn string) (c *certificate.Certificate, err error)

ObtainCertificate requests a new SSL/TLS certificate from ACME provider and returns an instance of Certificate.

func (Service) PeriodicRenew

func (s Service) PeriodicRenew() error

PeriodicRenew requests new SSL/TLS certificates on configured period.

func (Service) RegisterACMEUser

func (s Service) RegisterACMEUser(directoryURL, email string) (u *certificate.ACMEUser, err error)

RegisterACMEUser registers and saves ACME user authentication data.

func (Service) Renew

func (s Service) Renew() error

Renew requests a new SSL/TLS certificate before it expires.

func (Service) UpdateACMEChallenge

func (s Service) UpdateACMEChallenge(fqdn string, o *certificate.ACMEChallengeOptions) (c *certificate.ACMEChallenge, err error)

UpdateACMEChallenge alters the fields of existing ACMEChallenge.

func (Service) UpdateCertificate

func (s Service) UpdateCertificate(fqdn string, o *certificate.Options) (c *certificate.Certificate, err error)

UpdateCertificate alters the fields of existing Certificate.

Jump to

Keyboard shortcuts

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