mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 04:07:31 +00:00
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:
@@ -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)
|
||||
}
|
@@ -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,
|
||||
|
@@ -1,11 +0,0 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/caos/zitadel/internal/iam/model"
|
||||
)
|
||||
|
||||
type IAMRepository interface {
|
||||
Health(ctx context.Context) error
|
||||
IAMByID(ctx context.Context, id string) (*model.IAM, error)
|
||||
}
|
@@ -7,5 +7,4 @@ import (
|
||||
type Repository interface {
|
||||
Health(context.Context) error
|
||||
UserGrantRepository
|
||||
IAMRepository
|
||||
}
|
||||
|
Reference in New Issue
Block a user