Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateProvider ¶
type CertificateProvider struct {
// contains filtered or unexported fields
}
CertificateProvider is a component that is used to request certificates from a acme provider with dns01 verification.
func NewCertificateProvider ¶
func NewCertificateProvider( adapter *dbadapter.DatabaseAdapter, metaconfig *metaconfig.MetaConfig, defOpts CertificateProviderDefaultOptions) (*CertificateProvider, error)
Create new certificate provider. This will setup the connection to the acme & dns provider. The acme client is configured to use dns01 as verification.
adapter: adapter that should be used for communication with the database. metaconfig: metaconfig used to acquire configuration options. defOpts: default options for used values, if they are not present in metaconfig. returns certificate provider and an error if setup failed.
func (*CertificateProvider) RequestCertificate ¶
func (c *CertificateProvider) RequestCertificate(domains []string) ([]byte, []byte, error)
Requests certificate pair from the acme server.
domains: List of domains that will be in the SAN block of the certificate. returns bundled certificate chain, private key and an error if the request failed.
type CertificateProviderDefaultOptions ¶
type CertificateProviderDefaultOptions struct { // Directory url of the ACME server (https://datatracker.ietf.org/doc/html/rfc8555#section-7.1.1) ACME_DIRECTORY_URL string // Key type for certificates generated by the ACME server. ACME_CERTIFICATE_KEY_TYPE string // Email used for account registration on the ACME server. ACME_REGISTRATION_EMAIL string // DNS provider name used for dns01 verification (https://go-acme.github.io/lego/dns). ACME_DNS_PROVIDER string // .env file injected. Holds the dns credentials (https://go-acme.github.io/lego/dns). ACME_DNS_ENV_FILE string }
Holds default values for MetaConfig options used.