From d588fe2b6740971a6f58016b3bacbddf3362c379 Mon Sep 17 00:00:00 2001 From: Nicolas Caron Date: Wed, 27 Mar 2024 13:32:50 +0100 Subject: [PATCH] comment postgres config & add mongodb config in config.go --- config.go | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/config.go b/config.go index e33b255..eb675fb 100755 --- a/config.go +++ b/config.go @@ -7,23 +7,38 @@ import ( ) func ReadConfig() (*viper.Viper, error) { + // defaults := map[string]any{ + // "name": "COOPGO Mobility Accounts", + // "dev_env": false, + // "storage": map[string]any{ + // "db": map[string]any{ + // "type": "psql", + // "psql": map[string]any{ + // "user": "postgres", + // "password": "postgres", + // "host": "localhost", + // "port": "5432", + // "dbname": "coopgo_platform", + // "sslmode": "disable", + // "schema": "mobilityaccounts", + // "tables": map[string]any{ + // "accounts": "accounts", + // "accounts_auth_local": "accounts_auth_local", + // }, + // }, + // }, defaults := map[string]any{ "name": "COOPGO Mobility Accounts", "dev_env": false, "storage": map[string]any{ "db": map[string]any{ - "type": "psql", - "psql": map[string]any{ - "user": "postgres", - "password": "postgres", - "host": "localhost", - "port": "5432", - "dbname": "coopgo_platform", - "sslmode": "disable", - "schema": "mobilityaccounts", - "tables": map[string]any{ - "accounts": "accounts", - "accounts_auth_local": "accounts_auth_local", + "type": "mongodb", + "mongodb": map[string]any{ + "host": "localhost", + "port": "27017", + "db_name": "coopgo_platform", + "collections": map[string]any{ + "users": "users", }, }, },