fix: update config to commands (and queries) (#1342)

* fix: adaot config to commands (and queries)

* remove dependency on vv2 in v1

* add queries user to operator

* set password for queries on tests

* set password for queries on tests

* fix config
This commit is contained in:
Livio Amstutz
2021-02-24 11:17:39 +01:00
committed by GitHub
parent 438daebdb9
commit 8dcbbc87ca
101 changed files with 1122 additions and 1078 deletions

View File

@@ -2,10 +2,7 @@ package v1
import (
"github.com/caos/zitadel/internal/cache/config"
eventstore2 "github.com/caos/zitadel/internal/eventstore"
sql_v2 "github.com/caos/zitadel/internal/eventstore/repository/sql"
"github.com/caos/zitadel/internal/eventstore/v1/internal/repository/sql"
"github.com/caos/zitadel/internal/eventstore/v1/models"
)
type Config struct {
@@ -15,14 +12,12 @@ type Config struct {
}
func Start(conf Config) (Eventstore, error) {
repo, sqlClient, err := sql.Start(conf.Repository)
repo, _, err := sql.Start(conf.Repository)
if err != nil {
return nil, err
}
return &eventstore{
repo: repo,
aggregateCreator: models.NewAggregateCreator(conf.ServiceName),
esV2: eventstore2.NewEventstore(sql_v2.NewCRDB(sqlClient)),
repo: repo,
}, nil
}