feat: Iam projection (#3074)

* feat: implement projection for iam and clean up code

* feat: add migration

* fix: remove unused tests

* fix: handler
This commit is contained in:
Fabi
2022-01-21 08:52:12 +01:00
committed by GitHub
parent 44d78df4d4
commit b363ddd707
43 changed files with 375 additions and 2267 deletions

View File

@@ -1,22 +0,0 @@
package eventstore
import (
"context"
"github.com/caos/zitadel/internal/query"
"github.com/caos/zitadel/internal/iam/model"
)
type IamRepo struct {
IAMID string
IAMV2Query *query.Queries
}
func (repo *IamRepo) Health(ctx context.Context) error {
return nil
}
func (repo *IamRepo) IamByID(ctx context.Context) (*model.IAM, error) {
return repo.IAMV2Query.IAMByID(ctx, repo.IAMID)
}

View File

@@ -27,7 +27,6 @@ type Config struct {
type EsRepository struct {
spooler *es_spol.Spooler
eventstore.UserGrantRepo
eventstore.IamRepo
eventstore.TokenVerifierRepo
}
@@ -63,10 +62,6 @@ func Start(conf Config, authZ authz.Config, systemDefaults sd.SystemDefaults, qu
Auth: authZ,
Eventstore: es,
},
eventstore.IamRepo{
IAMID: systemDefaults.IamID,
IAMV2Query: queries,
},
eventstore.TokenVerifierRepo{
TokenVerificationKey: keyAlgorithm,
Eventstore: es,