psql first commit

This commit is contained in:
root
2023-04-25 15:14:42 +03:00
parent c96b6ed943
commit 15ab461a5e
49 changed files with 110 additions and 0 deletions

3
storage/storage.go Normal file → Executable file
View File

@@ -46,6 +46,9 @@ func NewDBStorage(cfg *viper.Viper) (DBStorage, error) {
case "mongodb":
s, err := NewMongoDBStorage(cfg)
return s, err
case "psql":
s, err := NewPostgresqlStorage(cfg)
return s, err
default:
return nil, fmt.Errorf("storage type %v is not supported", storage_type)
}