Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "unknown" Build = "unknown" Time = "unknown" Packer = "" )
Build number and versions injected at compile time.
Functions ¶
func GenerateServerCertEd ¶
GenerateServerCertEd will generate a new certificate and private key. This function will return an error if a key or a cert already exist as to avoid any data loss.
Types ¶
type Conf ¶
type Conf struct { Log LogConf `mapstructure:"log"` Server ServerConf `mapstructure:"server"` Database DatabaseConf `mapstructure:"database"` }
Conf holds the various configuration structures and is used to parse the config file if any.
type DatabaseConf ¶
type DatabaseConf struct { Path string `mapstructure:"path"` MaxBucketsRecursion int `mapstructure:"max_buckets_recursion"` DefaultLockTTL time.Duration `mapstructure:"default_lock_ttl"` }
DatabaseConf stores the database configuration.
type LogConf ¶
type LogConf struct { Level string `mapstructure:"level"` Type string `mapstructure:"type"` Caller bool `mapstructure:"caller"` }
LogConf represents the logger configuration.
type ServerConf ¶
type ServerConf struct { Host string `mapstructure:"host"` Port int `mapstructure:"port"` TLS TLSConfig `mapstructure:"tls"` }
ServerConf represents the server configuration.
func (ServerConf) ListenAddr ¶
func (s ServerConf) ListenAddr() string
ListenAddr returns a formatted string to listen on.
Click to show internal directories.
Click to hide internal directories.