mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 15:12:14 +00:00
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:
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type IAMRepository struct {
|
||||
IAMV2Query *query.QuerySide
|
||||
IAMV2Query *query.Queries
|
||||
}
|
||||
|
||||
func (repo *IAMRepository) IAMByID(ctx context.Context, id string) (*iam_model.IAM, error) {
|
||||
|
||||
@@ -30,13 +30,12 @@ type EsRepository struct {
|
||||
view *mgmt_view.View
|
||||
}
|
||||
|
||||
func Start(conf Config, systemDefaults sd.SystemDefaults, roles []string) (*EsRepository, error) {
|
||||
func Start(conf Config, systemDefaults sd.SystemDefaults, roles []string, queries *query.Queries) (*EsRepository, error) {
|
||||
|
||||
es, err := v1.Start(conf.Eventstore)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
esV2 := es.V2()
|
||||
|
||||
sqlClient, err := conf.View.Start()
|
||||
if err != nil {
|
||||
@@ -47,10 +46,6 @@ func Start(conf Config, systemDefaults sd.SystemDefaults, roles []string) (*EsRe
|
||||
return nil, err
|
||||
}
|
||||
|
||||
iamV2Query, err := query.StartQuerySide(&query.Config{Eventstore: esV2, SystemDefaults: systemDefaults})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
spool := spooler.StartSpooler(conf.Spooler, es, view, sqlClient, systemDefaults)
|
||||
|
||||
return &EsRepository{
|
||||
@@ -60,7 +55,7 @@ func Start(conf Config, systemDefaults sd.SystemDefaults, roles []string) (*EsRe
|
||||
UserRepo: eventstore.UserRepo{es, conf.SearchLimit, view, systemDefaults},
|
||||
UserGrantRepo: eventstore.UserGrantRepo{conf.SearchLimit, view},
|
||||
IAMRepository: eventstore.IAMRepository{
|
||||
IAMV2Query: iamV2Query,
|
||||
IAMV2Query: queries,
|
||||
},
|
||||
view: view,
|
||||
}, nil
|
||||
|
||||
Reference in New Issue
Block a user