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" json:"cache_dir,omitempty" bson:"cache_dir,omitempty"` // User email, mandatory Email string `mapstructure:"email" json:"email,omitempty" bson:"email,omitempty"` // supported values: http-01, tlsalpn-01 ChallengeType string `mapstructure:"challenge_type" json:"challenge_type,omitempty" bson:"challenge_type,omitempty"` // The alternate port to use for the ACME HTTP challenge AltHTTPPort int `mapstructure:"alt_http_port" json:"alt_http_port,omitempty" bson:"alt_http_port,omitempty"` // The alternate port to use for the ACME TLS-ALPN AltTLSALPNPort int `mapstructure:"alt_tlsalpn_port" json:"alt_tlsalpn_port,omitempty" bson:"alt_tlsalpn_port,omitempty"` // Use LE production endpoint or staging UseProductionEndpoint bool `mapstructure:"use_production_endpoint" json:"use_production_endpoint,omitempty" bson:"use_production_endpoint,omitempty"` // Domains to obtain certificates Domains []string `mapstructure:"domains" json:"domains,omitempty" bson:"domains,omitempty"` }
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 HTTP2Config ¶
type HTTP2Config struct { // H2C enables HTTP/2 over TCP H2C bool `mapstructure:"h2c" json:"h2c,omitempty" bson:"h2c,omitempty"` // MaxConcurrentStreams defaults to 128. MaxConcurrentStreams uint32 `mapstructure:"max_concurrent_streams" json:"max_concurrent_streams,omitempty" bson:"max_concurrent_streams,omitempty"` }
func (*HTTP2Config) EnableHTTP2 ¶
func (h2 *HTTP2Config) EnableHTTP2() bool
func (*HTTP2Config) InitDefaults ¶
func (h2 *HTTP2Config) InitDefaults() error
type SSLConfig ¶
type SSLConfig struct { // Address to listen as HTTPS server, defaults to 0.0.0.0:443. Address string `mapstructure:"address" json:"address,omitempty" bson:"address,omitempty"` // Acme configuration Acme *AcmeConfig `mapstructure:"acme" json:"acme,omitempty" bson:"acme,omitempty"` // Redirect when enabled forces all http connections to switch to https. Redirect bool `mapstructure:"redirect" json:"redirect,omitempty" bson:"redirect,omitempty"` // Key defined private server key. Key string `mapstructure:"key" json:"key,omitempty" bson:"key,omitempty"` // Cert is https certificate. Cert string `mapstructure:"cert" json:"cert,omitempty" bson:"cert,omitempty"` // RootCA file RootCA string `mapstructure:"root_ca" json:"root_ca,omitempty" bson:"root_ca,omitempty"` // AuthType mTLS auth AuthType ClientAuthType `mapstructure:"client_auth_type" json:"auth_type,omitempty" bson:"auth_type,omitempty"` // internal Port int // contains filtered or unexported fields }
func (*SSLConfig) EnableACME ¶
func (*SSLConfig) InitDefaults ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewHTTPSServer ¶
func (*Server) Start ¶
func (s *Server) Start(mdwr map[string]middleware.Middleware, order []string) error
Click to show internal directories.
Click to hide internal directories.