Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CAFile is the certificate authority file CAFile = "ca.pem" // CertFile is the certificate file CertFile = "rmd-cert.pem" // KeyFile is the rmd private key file KeyFile = "rmd-key.pem" // ClientCAFile certificate authority file of client side ClientCAFile = "ca.pem" )
Variables ¶
View Source
var ClientAuth = map[string]tls.ClientAuthType{ "no": tls.NoClientCert, "require": tls.RequestClientCert, "require_any": tls.RequireAnyClientCert, "challenge_given": tls.VerifyClientCertIfGiven, "challenge": tls.RequireAndVerifyClientCert, }
ClientAuth is a string to tls clientAuthType map
Functions ¶
Types ¶
type Config ¶
type Config struct {
Def Default `mapstructure:"default"`
Db Database `mapstructure:"database"`
Dbg Debug `mapstructure:"debug"`
}
Config represent the configuration struct
type Database ¶
type Database struct {
Backend string `toml:"backend"`
Transport string `toml:"transport"`
DBName string `toml:"dbname"`
}
Database represents data base configuration
type Default ¶
type Default struct {
Address string `toml:"address"`
TLSPort uint `toml:"tlsport"`
CertPath string `toml:"certpath"`
ClientCAPath string `toml:"clientcapath"`
ClientAuth string `toml:"clientauth"`
UnixSock string `toml:"unixsock"`
PolicyPath string `toml:"policypath"`
OpenStackEnable bool `toml:"openstackenable"`
SysResctrl string `toml:"sysresctrl"`
Plugins string `toml:"plugins"`
DbValidatorInterval uint `toml:"dbValidatorInterval"`
}
Default is the configuration in default section of config file TODO consider create a new struct for TLSConfig
Click to show internal directories.
Click to hide internal directories.