Documentation ¶
Index ¶
- func CheckFileExists(filename string) error
- func GetTLSConfig(s *ClientTLSSettings) (*tls.Config, error)
- func GetX509KeyPair(certFile, keyFile, keyPassword string) (tls.Certificate, error)
- type BackstopError
- type ClientAuthType
- type ClientTLSSettings
- type Configuration
- type Errors
- type HTTP
- type SSL
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFileExists ¶
func GetTLSConfig ¶
func GetTLSConfig(s *ClientTLSSettings) (*tls.Config, error)
func GetX509KeyPair ¶
func GetX509KeyPair(certFile, keyFile, keyPassword string) (tls.Certificate, error)
Types ¶
type BackstopError ¶
type ClientAuthType ¶
type ClientAuthType string
const ( ClientAuthNone ClientAuthType = "none" ClientAuthWant ClientAuthType = "want" ClientAuthNeed ClientAuthType = "need" ClientAuthAny ClientAuthType = "any" ClientAuthRequest ClientAuthType = "request" )
type ClientTLSSettings ¶
type ClientTLSSettings struct { // Override server name to check on certificate ServerName string `yaml:"serverName,omitempty" json:"serverName,omitempty"` // Don't check server name InsecureSkipVerify bool `yaml:"insecureSkipVerify" json:"insecureSkipVerify"` // Key file if the cert file doesn't provide it ClientKeyFile string `yaml:"clientKeyFile,omitempty" json:"clientKeyFile,omitempty"` // Key password if the key is encrypted ClientKeyPassword string `yaml:"clientKeyFilePassword,omitempty" json:"clientKeyFilePassword,omitempty"` // If not provided, it will default to the system cacerts CAcertFile string `yaml:"cacertFile,omitempty" json:"cacertFile,omitempty"` // Client certificate file - useful for mTLS ClientCertFile string `yaml:"clientCertFile,omitempty" json:"clientCertFile,omitempty"` }
type Configuration ¶ added in v1.7.1
type Configuration struct {
HTTP HTTP
}
func (Configuration) GetAddr ¶ added in v1.7.1
func (s Configuration) GetAddr() string
type SSL ¶
type SSL struct { // Enable SSL Enabled bool // 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 // Key file if the cert file doesn't provide it KeyFile string // Key password if the key is encrypted KeyPassword string // when using mTLS, CA PEM. If not provided, it will default to the certificate of the server as a CA CAcertFile string // Client auth requested (none, want, need, any, request) ClientAuth ClientAuthType }
Click to show internal directories.
Click to hide internal directories.