Documentation ¶
Index ¶
- func NewDB(filename string, fileMode os.FileMode, boltOptions *bolt.Options) (db *bolt.DB, err error)
- type Logger
- type Service
- func (s Service) ACMEChallenge(fqdn string) (c *certificate.ACMEChallenge, err error)
- func (s Service) ACMEChallenges(start string, limit int) (page *certificate.ACMEChallengesPage, err error)
- func (s Service) ACMEUser() (u *certificate.ACMEUser, err error)
- func (s Service) Certificate(fqdn string) (c *certificate.Certificate, err error)
- func (s Service) Certificates(start string, limit int) (page *certificate.CertificatesPage, err error)
- func (s Service) CertificatesInfoByExpiry(since time.Time, start string, limit int) (page *certificate.InfosPage, err error)
- func (s Service) DataDump(ifModifiedSince *time.Time) (dump *dataDump.Dump, err error)
- func (s Service) DeleteACMEChallenge(fqdn string) (c *certificate.ACMEChallenge, err error)
- func (s Service) DeleteCertificate(fqdn string) (c *certificate.Certificate, err error)
- func (s Service) IsCertificateBeingObtained(fqdn string) (yes bool, err error)
- func (s Service) ObtainCertificate(fqdn string) (c *certificate.Certificate, err error)
- func (s Service) PeriodicRenew() error
- func (s Service) RegisterACMEUser(directoryURL, email string) (u *certificate.ACMEUser, err error)
- func (s Service) Renew() error
- func (s Service) UpdateACMEChallenge(fqdn string, o *certificate.ACMEChallengeOptions) (c *certificate.ACMEChallenge, err error)
- func (s Service) UpdateCertificate(fqdn string, o *certificate.Options) (c *certificate.Certificate, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
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 ¶
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 ¶
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) 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.