Documentation ¶
Overview ¶
Package acme provides automatic access to certificates from Let's Encrypt and any other ACME-based CA The code here is largely coiped from https://github.com/go-acme/lego/tree/master/cmd This package is intended to provide basic functionality for obtaining and renewing certificates and implements the "HTTP-01" and "TLSALPN-01" challenge types. For more advanced features use external tools such as "lego"
Index ¶
- func GetCertificates() error
- func GetCertificatesForConfig(c *dataprovider.ACMEConfigs, configDir string) error
- func GetHTTP01WebRoot() string
- func Initialize(c Configuration, configDir string, checkRenew bool) error
- func SetReloadHTTPDCertsFn(fn func() error)
- type Configuration
- type HTTP01Challenge
- type TLSALPN01Challenge
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCertificates ¶
func GetCertificates() error
GetCertificates tries to obtain the certificates using the global configuration
func GetCertificatesForConfig ¶ added in v2.5.0
func GetCertificatesForConfig(c *dataprovider.ACMEConfigs, configDir string) error
GetCertificatesForConfig tries to obtain the certificates using the provided configuration override. This is a NOOP if we already have certificates
func GetHTTP01WebRoot ¶ added in v2.5.0
func GetHTTP01WebRoot() string
GetHTTP01WebRoot returns the web root for HTTP-01 challenge
func Initialize ¶ added in v2.5.0
func Initialize(c Configuration, configDir string, checkRenew bool) error
Initialize validates and set the configuration
func SetReloadHTTPDCertsFn ¶ added in v2.5.0
func SetReloadHTTPDCertsFn(fn func() error)
SetReloadHTTPDCertsFn set the function to call to reload HTTPD certificates
Types ¶
type Configuration ¶
type Configuration struct { Email string `json:"email" mapstructure:"email"` KeyType string `json:"key_type" mapstructure:"key_type"` CertsPath string `json:"certs_path" mapstructure:"certs_path"` CAEndpoint string `json:"ca_endpoint" mapstructure:"ca_endpoint"` // if a certificate is to be valid for multiple domains specify the names separated by commas, // for example: example.com,www.example.com Domains []string `json:"domains" mapstructure:"domains"` RenewDays int `json:"renew_days" mapstructure:"renew_days"` HTTP01Challenge HTTP01Challenge `json:"http01_challenge" mapstructure:"http01_challenge"` TLSALPN01Challenge TLSALPN01Challenge `json:"tls_alpn01_challenge" mapstructure:"tls_alpn01_challenge"` // contains filtered or unexported fields }
Configuration holds the ACME configuration
func (*Configuration) Initialize ¶
func (c *Configuration) Initialize(configDir string) error
Initialize validates and initialize the configuration
type HTTP01Challenge ¶
type HTTP01Challenge struct { Port int `json:"port" mapstructure:"port"` WebRoot string `json:"webroot" mapstructure:"webroot"` ProxyHeader string `json:"proxy_header" mapstructure:"proxy_header"` }
HTTP01Challenge defines the configuration for HTTP-01 challenge type
type TLSALPN01Challenge ¶
type TLSALPN01Challenge struct {
Port int `json:"port" mapstructure:"port"`
}
TLSALPN01Challenge defines the configuration for TLSALPN-01 challenge type