Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientAuthType ¶
type ClientAuthType string
const ( // No mTLS ClientAuthNone ClientAuthType = "none" // Client cert verified if provided ClientAuthWant ClientAuthType = "want" // Client cert required and verified ClientAuthNeed ClientAuthType = "need" // Any client cert will do ClientAuthAny ClientAuthType = "any" // Request client cert ClientAuthRequest ClientAuthType = "request" )
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(config *ServerConfig) *Server
type ServerConfig ¶
type ServerConfig struct { Host string `yaml:"host"` Port uint32 `yaml:"port"` Ssl Ssl `yaml:"ssl"` }
func (*ServerConfig) GetAddr ¶
func (s *ServerConfig) GetAddr() string
type Ssl ¶
type Ssl struct { // Enable SSL Enabled bool `yaml:"enabled"` // Certificate file, can be just a PEM of cert + key or just the cert in which case you'll also need // to provide the key file CertFile string `yaml:"certFile"` // Key file if the cert file doesn't provide it KeyFile string `yaml:"keyFile"` // Key password if the key is encrypted KeyPassword string `yaml:"keyFilePassword"` // when using mTLS, CA PEM. If not provided, it will default to the certificate of the server as a CA CAcertFile string `yaml:"cacertFile"` // Client auth requested (none, want, need, any, request) ClientAuth ClientAuthType `yaml:"clientAuth"` }
Click to show internal directories.
Click to hide internal directories.