mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-20 22:41:56 +00:00
start implementing new eventstore on iam
This commit is contained in:
@@ -2,14 +2,21 @@ package eventstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
iam_model "github.com/caos/zitadel/internal/iam/model"
|
||||
"github.com/caos/zitadel/internal/iam/repository/eventsourcing"
|
||||
iam_business "github.com/caos/zitadel/internal/v2/business/iam"
|
||||
)
|
||||
|
||||
type IAMRepository struct {
|
||||
IAMEvents *eventsourcing.IAMEventstore
|
||||
|
||||
IAMV2 *iam_business.Repository
|
||||
}
|
||||
|
||||
func (repo *IAMRepository) IAMByID(ctx context.Context, id string) (*iam_model.IAM, error) {
|
||||
if repo.IAMV2 != nil {
|
||||
return repo.IAMV2.IAMByID(ctx, id)
|
||||
}
|
||||
return repo.IAMEvents.IAMByID(ctx, id)
|
||||
}
|
||||
|
Reference in New Issue
Block a user