Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // DatabaseURL is a connection string to the database. DatabaseURL string `mapstructure:"DATABASE_URL"` // HTTPServerListenAddress is an address on which the HTTP server will listen. HTTPServerListenAddress string `mapstructure:"HTTP_SERVER_LISTEN_ADDRESS"` // TokenSecret is a secret used to sign JWT tokens. TokenSecret string `mapstructure:"TOKEN_SECRET"` // TokenDuration is a duration for which the JWT token is valid. TokenDuration time.Duration `mapstructure:"TOKEN_DURATION"` }
Config stores all configuration of the application. The values are read by viper from a config file or envirionment variables.
func LoadConfig ¶
LoadConfig reads configuration from file or environment variables. Config values specified in the config file are overwritten with environment variables if set.
Click to show internal directories.
Click to hide internal directories.