Documentation ¶
Index ¶
Constants ¶
View Source
const ( HTTP01 challenge = "http-01" TLSAlpn01 challenge = "tlsalpn-01" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AcmeConfig ¶
type AcmeConfig struct { // directory to save the certificates, le_certs default CacheDir string `mapstructure:"cache_dir"` // User email, mandatory Email string `mapstructure:"email"` // supported values: http-01, tlsalpn-01 ChallengeType string `mapstructure:"challenge_type"` // The alternate port to use for the ACME HTTP challenge AltHTTPPort int `mapstructure:"alt_http_port"` // The alternate port to use for the ACME TLS-ALPN AltTLSALPNPort int `mapstructure:"alt_tlsalpn_port"` // Use LE production endpoint or staging UseProductionEndpoint bool `mapstructure:"use_production_endpoint"` // Domains to obtain certificates Domains []string `mapstructure:"domains"` }
func (*AcmeConfig) InitDefaults ¶
func (ac *AcmeConfig) InitDefaults() error
type ClientAuthType ¶
type ClientAuthType string
const ( NoClientCert ClientAuthType = "no_client_cert" RequestClientCert ClientAuthType = "request_client_cert" RequireAnyClientCert ClientAuthType = "require_any_client_cert" VerifyClientCertIfGiven ClientAuthType = "verify_client_cert_if_given" RequireAndVerifyClientCert ClientAuthType = "require_and_verify_client_cert" )
type HTTP2 ¶
type HTTP2 struct { // H2C enables HTTP/2 over TCP H2C bool // MaxConcurrentStreams defaults to 128. MaxConcurrentStreams uint32 `mapstructure:"max_concurrent_streams"` }
HTTP2 HTTP/2 server customizations.
func (*HTTP2) EnableHTTP2 ¶
func (*HTTP2) InitDefaults ¶
InitDefaults sets default values for HTTP/2 configuration.
type SSL ¶
type SSL struct { // Address to listen as HTTPS server, defaults to 0.0.0.0:443. Address string // ACME configuration Acme *AcmeConfig `mapstructure:"acme"` // Redirect when enabled forces all http connections to switch to https. Redirect bool // Key defined private server key. Key string // Cert is https certificate. Cert string // Root CA file RootCA string `mapstructure:"root_ca"` // mTLS auth AuthType ClientAuthType `mapstructure:"client_auth_type"` // internal Port int // contains filtered or unexported fields }
SSL defines https server configuration.
func (*SSL) EnableACME ¶
func (*SSL) InitDefaults ¶
Click to show internal directories.
Click to hide internal directories.