Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
PostgresUser string `mapstructure:"POSTGRES_USER" env:"POSTGRES_USER"`
PostgresPassword string `mapstructure:"POSTGRES_PASSWORD" env:"POSTGRES_PASSWORD"`
DbName string `mapstructure:"DB_NAME" env:"DB_NAME"`
DbHost string `mapstructure:"DB_HOST" env:"DB_HOST"`
DbPort int `mapstructure:"DB_PORT" env:"DB_PORT"`
SecretKey string `mapstructure:"SECRET_KEY" env:"SECRET_KEY"`
RedisPass string `mapstructure:"REDIS_PASS" env:"REDIS_PASS"`
RedisHost string `mapstructure:"REDIS_HOST" env:"REDIS_HOST"`
RedisDb int `mapstructure:"REDIS_DB" env:"REDIS_DB"`
MaxFileSize int64 `mapstructure:"MAX_FILE_SIZE" env:"MAX_FILE_SIZE"`
}
Config stores all configuration of the application
func LoadConfig ¶
LoadConfig Loads the config from the .env file, if not present it loads it from the environment variables Usage: conf, err := LoadConfig("../","filename") filename is assumed to have a .env extension do not add .env to the filename
Click to show internal directories.
Click to hide internal directories.