Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvSettings ¶
type EnvSettings struct { EnvHTTPListenPort int `envconfig:"HTTP_PORT" default:"8080"` EnvLogLevel string `envconfig:"LOG_LEVEL" default:"info"` EnvStorageAddr string `envconfig:"STORAGE_ADDR" default:"0.0.0.0:5432"` EnvStoragePwd string `envconfig:"STORAGE_PWD"` }
EnvSettings reads settings from environment variables.
func NewEnvSettings ¶
func NewEnvSettings(prefix string) (EnvSettings, error)
NewEnvSettings returns EnvSettings initialized from environment variables. `prefix` allows to add an extra prefix that needs to be used with all env var names.
func (EnvSettings) HTTPPort ¶
func (es EnvSettings) HTTPPort() int
HTTPPort returns a port number to listening for incoming HTTP connections.
func (EnvSettings) LogLevel ¶
func (es EnvSettings) LogLevel() string
LogLevel returns a logging level.
func (EnvSettings) StorageAddr ¶
func (es EnvSettings) StorageAddr() string
StorageAddr returns address of the main persistence storage.
func (EnvSettings) StoragePwd ¶
func (es EnvSettings) StoragePwd() string
Click to show internal directories.
Click to hide internal directories.