Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConfigNotSet = errors.New("call LoadConfig before this function")
Functions ¶
func LoadConfig ¶
LoadConfig is used to load the configuration from either the json config file or the environment variables.
Types ¶
type Configuration ¶
type Configuration struct {
MongoDsn string `json:"mongo_dsn"`
RedisDsn string `json:"redis_dsn"`
DbName string `json:"db_name"`
Relations []Relation `json:"relations"`
Port uint32 `json:"port"`
}
func Get ¶
func Get() (Configuration, error)
Get fetches the application configuration. LoadConfig must have been called previously for this to work. Use this when you need to get access to the config object at runtime
Click to show internal directories.
Click to hide internal directories.