acme

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NeedsRenewal

func NeedsRenewal(notAfter time.Time) bool

NeedsRenewal checks if a certificate needs renewal (within 30 days of expiry)

Types

type CertificateData

type CertificateData struct {
	ID             int64
	DomainName     string
	Certificate    string
	PrivateKey     string
	Issuer         string
	NotBefore      time.Time
	NotAfter       time.Time
	Status         string
	ACMEAccountURL string
	ACMEOrderURL   string
	AutoRenew      bool
}

type Client

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

Client manages ACME certificate operations

func NewClient

func NewClient(email string, production bool, logger *zap.Logger) (*Client, error)

NewClient creates a new ACME client

func (*Client) ObtainCertificate

func (c *Client) ObtainCertificate(ctx context.Context, domains []string) (*certificate.Resource, error)

ObtainCertificate requests a new certificate for the given domains

func (*Client) RenewCertificate

func (c *Client) RenewCertificate(ctx context.Context, cert *certificate.Resource) (*certificate.Resource, error)

RenewCertificate renews an existing certificate

func (*Client) RevokeCertificate

func (c *Client) RevokeCertificate(ctx context.Context, cert *certificate.Resource) error

RevokeCertificate revokes a certificate

type Service

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

Service manages ACME certificate lifecycle

func NewService

func NewService(email string, production bool, db *database.DB, logger *zap.Logger) (*Service, error)

NewService creates a new ACME service

func (*Service) CheckAndRenewExpiring

func (s *Service) CheckAndRenewExpiring(ctx context.Context) error

CheckAndRenewExpiring checks all certificates and renews those expiring soon

func (*Service) ObtainAndStoreCertificate

func (s *Service) ObtainAndStoreCertificate(ctx context.Context, domain string, altNames []string) error

ObtainAndStoreCertificate requests and stores a new certificate

func (*Service) RenewCertificate

func (s *Service) RenewCertificate(ctx context.Context, domain string) error

RenewCertificate renews a certificate for a domain

type User

type User struct {
	Email        string
	Registration *registration.Resource
	// contains filtered or unexported fields
}

User implements registration.User for ACME

func (*User) GetEmail

func (u *User) GetEmail() string

func (*User) GetPrivateKey

func (u *User) GetPrivateKey() crypto.PrivateKey

func (*User) GetRegistration

func (u *User) GetRegistration() *registration.Resource

Jump to

Keyboard shortcuts

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