feat: prepare for multiple database types (#4068)

BREAKING CHANGE: the database and admin user config has changed.
This commit is contained in:
Livio Spring
2022-07-28 16:25:42 +02:00
committed by GitHub
parent bc9a85daf3
commit f610d48569
19 changed files with 354 additions and 161 deletions

View File

@@ -36,6 +36,7 @@ func MustNewConfig(v *viper.Viper) *Config {
hook.TagToLanguageHookFunc(),
mapstructure.StringToTimeDurationHookFunc(),
mapstructure.StringToSliceHookFunc(","),
database.DecodeHook,
)),
)
logging.OnError(err).Fatal("unable to read default config")

View File

@@ -56,7 +56,7 @@ func Flags(cmd *cobra.Command) {
func Setup(config *Config, steps *Steps, masterKey string) {
logging.Info("setup started")
dbClient, err := database.Connect(config.Database)
dbClient, err := database.Connect(config.Database, false)
logging.OnError(err).Fatal("unable to connect to database")
eventstoreClient, err := eventstore.Start(dbClient)