Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Db DatabaseConfig `mapstructure:"database"` Http HttpConfig `mapstructure:"httpd"` Log LogConfig `mapstructure:"log"` }
func ConfigFromViper ¶
ConfigFromViper returns a Server config from the service's configuration file and the viper CLI arguments.
type DatabaseConfig ¶
type DatabaseConfig struct { Hostname string `mapstructure:"hostname" toml:"hostname"` Port int `mapstructure:"port" toml:"port"` Database string `mapstructure:"dbname" toml:"dbname"` User string `mapstructure:"username" toml:"username"` Password string `mapstructure:"password" toml:"password"` Sslmode string `mapstructure:"sslmode" toml:"sslmode"` }
type HttpConfig ¶
type Opts ¶
type Opts func(*Server)
type ResponseMessage ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds the state of an instance of this service
func NewFromConfig ¶
NewFromConfig initializes a Server given a Config
Click to show internal directories.
Click to hide internal directories.