mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-21 17:39:40 +00:00
fix: move v2 pkgs (#1331)
* fix: move eventstore pkgs * fix: move eventstore pkgs * fix: remove v2 view * fix: remove v2 view
This commit is contained in:
20
internal/query/iam_policy_org_iam_model.go
Normal file
20
internal/query/iam_policy_org_iam_model.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package query
|
||||
|
||||
import (
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
"github.com/caos/zitadel/internal/repository/iam"
|
||||
"github.com/caos/zitadel/internal/repository/policy"
|
||||
)
|
||||
|
||||
type IAMOrgIAMPolicyReadModel struct{ OrgIAMPolicyReadModel }
|
||||
|
||||
func (rm *IAMOrgIAMPolicyReadModel) AppendEvents(events ...eventstore.EventReader) {
|
||||
for _, event := range events {
|
||||
switch e := event.(type) {
|
||||
case *iam.OrgIAMPolicyAddedEvent:
|
||||
rm.OrgIAMPolicyReadModel.AppendEvents(&e.OrgIAMPolicyAddedEvent)
|
||||
case *policy.OrgIAMPolicyAddedEvent:
|
||||
rm.OrgIAMPolicyReadModel.AppendEvents(e)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user