certacme

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLegoLogger

func NewLegoLogger(logger *slog.Logger) legolog.StdLogger

Types

type ACMEAccount

type ACMEAccount = domain.ACMEAccount

func NewACMEAccount

func NewACMEAccount(config *ACMEConfig, email string, register bool) (*ACMEAccount, error)

func NewACMEAccountWithSingleFlight

func NewACMEAccountWithSingleFlight(config *ACMEConfig, email string) (*ACMEAccount, error)

type ACMEClient

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

func NewACMEClient

func NewACMEClient(config *ACMEConfig, email string, configures ...func(*lego.Config) error) (*ACMEClient, error)

func NewACMEClientWithAccount

func NewACMEClientWithAccount(account *ACMEAccount, configures ...func(*lego.Config) error) (*ACMEClient, error)

func (*ACMEClient) ObtainCertificate

func (c *ACMEClient) ObtainCertificate(ctx context.Context, request *ObtainCertificateRequest) (*ObtainCertificateResponse, error)

func (*ACMEClient) RevokeCertificate

func (c *ACMEClient) RevokeCertificate(ctx context.Context, request *RevokeCertificateRequest) (*RevokeCertificateResponse, error)

type ACMEConfig

type ACMEConfig struct {
	CAProvider       domain.CAProviderType
	CADirUrl         string
	EABKid           string
	EABHmacKey       string
	CertifierKeyType certcrypto.KeyType
}

func NewACMEConfig

func NewACMEConfig(options *ACMEConfigOptions) (*ACMEConfig, error)

type ACMEConfigOptions

type ACMEConfigOptions struct {
	CAProvider       string
	CAAccessConfig   map[string]any
	CAProviderConfig map[string]any
	CertifierKeyType certcrypto.KeyType
}

type ObtainCertificateRequest

type ObtainCertificateRequest struct {
	Domains          []string
	PrivateKeyType   certcrypto.KeyType
	PrivateKeyPEM    string
	ValidityNotAfter time.Time

	// 提供商相关
	ChallengeType          string
	Provider               string
	ProviderAccessConfig   map[string]any
	ProviderExtendedConfig map[string]any

	// 解析相关
	DisableFollowCNAME bool
	Nameservers        []string

	// DNS-01 质询相关
	DnsPropagationWait    int
	DnsPropagationTimeout int
	DnsTTL                int

	// HTTP-01 质询相关
	HttpDelayWait int

	// ACME 相关
	PreferredChain string
	ACMEProfile    string

	// ARI 相关
	ARIReplacesAcctUrl string
	ARIReplacesCertId  string
}

type ObtainCertificateResponse

type ObtainCertificateResponse struct {
	CSR                  string
	FullChainCertificate string
	IssuerCertificate    string
	PrivateKey           string
	ACMEAcctUrl          string
	ACMECertUrl          string
	ACMECertStableUrl    string
	ARIReplaced          bool
}

type RevokeCertificateRequest

type RevokeCertificateRequest struct {
	Certificate string
}

type RevokeCertificateResponse

type RevokeCertificateResponse struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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