certacme

package
v0.4.25 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACMEAccount

type ACMEAccount = domain.ACMEAccount

func CreateACMEAccount added in v0.4.25

func CreateACMEAccount(ctx context.Context, config *ACMEConfig, email string) (*ACMEAccount, error)

func CreateACMEAccountWithSingleFlight added in v0.4.25

func CreateACMEAccountWithSingleFlight(ctx context.Context, config *ACMEConfig, email string) (*ACMEAccount, error)

type ACMEClient

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

func NewACMEClient deprecated

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

Deprecated: use NewACMEClientWithAccount instead.

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
}

func CreateACMEConfig added in v0.4.25

func CreateACMEConfig(ctx context.Context, options *ACMEConfigOptions) (*ACMEConfig, error)

type ACMEConfigOptions

type ACMEConfigOptions struct {
	CAProvider               domain.CAProviderType
	CAProviderAccessConfig   map[string]any
	CAProviderExtendedConfig map[string]any
	CertifierKeyAlgorithm    domain.CertificateKeyAlgorithmType
}

type ObtainCertificateRequest

type ObtainCertificateRequest struct {
	DomainOrIPs       []string
	PrivateKeyType    certcrypto.KeyType
	PrivateKeyPEM     string
	ValidityNotBefore time.Time
	ValidityNotAfter  time.Time
	NoCommonName      bool

	// 提供商相关
	ChallengeType          string
	Provider               domain.ACMEChallengeProviderType
	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 相关
	ARIReplacesAccountUrl string
	ARIReplacesCertId     string
}

type ObtainCertificateResponse

type ObtainCertificateResponse struct {
	CAProvider           domain.CAProviderType
	CSR                  string
	FullChainCertificate string
	IssuerCertificate    string
	PrivateKey           string
	ACMEAccountUrl       string
	ACMECertificateUrl   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