refactor(eventstore): rename EventPusher to Command, EventReader to Event, PushEvents to Push and FilterEvents to Filter (#2907)

This commit is contained in:
Silvan
2022-01-03 09:19:07 +01:00
committed by GitHub
parent 9a374f9c5c
commit 09be70949f
339 changed files with 1436 additions and 1346 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ package command
import (
"context"
"github.com/caos/logging"
"github.com/caos/zitadel/internal/domain"
"github.com/caos/zitadel/internal/eventstore"
@@ -21,7 +22,7 @@ func (s *Step11) execute(ctx context.Context, commandSide *Commands) error {
}
func (c *Commands) SetupStep11(ctx context.Context, step *Step11) error {
fn := func(iam *IAMWriteModel) ([]eventstore.EventPusher, error) {
fn := func(iam *IAMWriteModel) ([]eventstore.Command, error) {
iamAgg := IAMAggregateFromWriteModel(&iam.WriteModel)
var uniqueContraintMigrations []*domain.UniqueConstraintMigration
if step.MigrateV1EventstoreToV2 {
@@ -33,7 +34,7 @@ func (c *Commands) SetupStep11(ctx context.Context, step *Step11) error {
uniqueContraintMigrations = uniqueConstraints.UniqueConstraints
}
logging.Log("SETUP-M9fsd").Info("migrate v1 eventstore to v2")
return []eventstore.EventPusher{iam_repo.NewMigrateUniqueConstraintEvent(ctx, iamAgg, uniqueContraintMigrations)}, nil
return []eventstore.Command{iam_repo.NewMigrateUniqueConstraintEvent(ctx, iamAgg, uniqueContraintMigrations)}, nil
}
return c.setup(ctx, step, fn)
}