feat: wip postgres support

This commit is contained in:
Ludvig Lundgren 2022-03-27 03:12:00 +02:00
parent ffa2447c59
commit cc0c071cce
16 changed files with 362 additions and 211 deletions

View file

@ -23,6 +23,12 @@ func Defaults() domain.Config {
BaseURL: "/",
SessionSecret: "secret-session-key",
CustomDefinitions: "",
DatabaseType: "sqlite",
PostgresHost: "",
PostgresPort: 0,
PostgresDatabase: "",
PostgresUser: "",
PostgresPass: "",
}
}
@ -127,6 +133,7 @@ func Read(configPath string) domain.Config {
}
viper.SetConfigFile(path.Join(configPath, "config.toml"))
config.ConfigPath = configPath
} else {
viper.SetConfigName("config")