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

View File

@@ -186,7 +186,7 @@ func (p *UserProjection) reducers() []handler.AggregateReducer {
}
}
func (p *UserProjection) reduceHumanAdded(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanAdded(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanAddedEvent)
if !ok {
logging.LogWithFields("HANDL-Cw9BX", "seq", event.Sequence(), "expectedType", user.HumanAddedType).Error("wrong event type")
@@ -222,7 +222,7 @@ func (p *UserProjection) reduceHumanAdded(event eventstore.EventReader) (*handle
), nil
}
func (p *UserProjection) reduceHumanRegistered(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanRegistered(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanRegisteredEvent)
if !ok {
logging.LogWithFields("HANDL-qoZyC", "seq", event.Sequence(), "expectedType", user.HumanRegisteredType).Error("wrong event type")
@@ -258,7 +258,7 @@ func (p *UserProjection) reduceHumanRegistered(event eventstore.EventReader) (*h
), nil
}
func (p *UserProjection) reduceUserLocked(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceUserLocked(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.UserLockedEvent)
if !ok {
logging.LogWithFields("HANDL-c6irw", "seq", event.Sequence(), "expectedType", user.UserLockedType).Error("wrong event type")
@@ -278,7 +278,7 @@ func (p *UserProjection) reduceUserLocked(event eventstore.EventReader) (*handle
), nil
}
func (p *UserProjection) reduceUserUnlocked(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceUserUnlocked(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.UserUnlockedEvent)
if !ok {
logging.LogWithFields("HANDL-eyHv5", "seq", event.Sequence(), "expectedType", user.UserUnlockedType).Error("wrong event type")
@@ -298,7 +298,7 @@ func (p *UserProjection) reduceUserUnlocked(event eventstore.EventReader) (*hand
), nil
}
func (p *UserProjection) reduceUserDeactivated(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceUserDeactivated(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.UserDeactivatedEvent)
if !ok {
logging.LogWithFields("HANDL-EqbaJ", "seq", event.Sequence(), "expectedType", user.UserDeactivatedType).Error("wrong event type")
@@ -318,7 +318,7 @@ func (p *UserProjection) reduceUserDeactivated(event eventstore.EventReader) (*h
), nil
}
func (p *UserProjection) reduceUserReactivated(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceUserReactivated(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.UserReactivatedEvent)
if !ok {
logging.LogWithFields("HANDL-kAaBr", "seq", event.Sequence(), "expectedType", user.UserReactivatedType).Error("wrong event type")
@@ -338,7 +338,7 @@ func (p *UserProjection) reduceUserReactivated(event eventstore.EventReader) (*h
), nil
}
func (p *UserProjection) reduceUserRemoved(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceUserRemoved(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.UserRemovedEvent)
if !ok {
logging.LogWithFields("HANDL-n2JMe", "seq", event.Sequence(), "expectedType", user.UserRemovedType).Error("wrong event type")
@@ -353,7 +353,7 @@ func (p *UserProjection) reduceUserRemoved(event eventstore.EventReader) (*handl
), nil
}
func (p *UserProjection) reduceUserNameChanged(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceUserNameChanged(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.UsernameChangedEvent)
if !ok {
logging.LogWithFields("HANDL-7J5xL", "seq", event.Sequence(), "expectedType", user.UserUserNameChangedType).Error("wrong event type")
@@ -373,7 +373,7 @@ func (p *UserProjection) reduceUserNameChanged(event eventstore.EventReader) (*h
), nil
}
func (p *UserProjection) reduceHumanProfileChanged(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanProfileChanged(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanProfileChangedEvent)
if !ok {
logging.LogWithFields("HANDL-Dwfyn", "seq", event.Sequence(), "expectedType", user.HumanProfileChangedType).Error("wrong event type")
@@ -425,7 +425,7 @@ func (p *UserProjection) reduceHumanProfileChanged(event eventstore.EventReader)
), nil
}
func (p *UserProjection) reduceHumanPhoneChanged(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanPhoneChanged(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanPhoneChangedEvent)
if !ok {
logging.LogWithFields("HANDL-pnRqf", "seq", event.Sequence(), "expectedType", user.HumanPhoneChangedType).Error("wrong event type")
@@ -456,7 +456,7 @@ func (p *UserProjection) reduceHumanPhoneChanged(event eventstore.EventReader) (
), nil
}
func (p *UserProjection) reduceHumanPhoneRemoved(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanPhoneRemoved(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanPhoneRemovedEvent)
if !ok {
logging.LogWithFields("HANDL-eMpOG", "seq", event.Sequence(), "expectedType", user.HumanPhoneRemovedType).Error("wrong event type")
@@ -487,7 +487,7 @@ func (p *UserProjection) reduceHumanPhoneRemoved(event eventstore.EventReader) (
), nil
}
func (p *UserProjection) reduceHumanPhoneVerified(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanPhoneVerified(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanPhoneVerifiedEvent)
if !ok {
logging.LogWithFields("HANDL-GhFOY", "seq", event.Sequence(), "expectedType", user.HumanPhoneVerifiedType).Error("wrong event type")
@@ -517,7 +517,7 @@ func (p *UserProjection) reduceHumanPhoneVerified(event eventstore.EventReader)
), nil
}
func (p *UserProjection) reduceHumanEmailChanged(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanEmailChanged(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanEmailChangedEvent)
if !ok {
logging.LogWithFields("HANDL-MDfHX", "seq", event.Sequence(), "expectedType", user.HumanEmailChangedType).Error("wrong event type")
@@ -548,7 +548,7 @@ func (p *UserProjection) reduceHumanEmailChanged(event eventstore.EventReader) (
), nil
}
func (p *UserProjection) reduceHumanEmailVerified(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanEmailVerified(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanEmailVerifiedEvent)
if !ok {
logging.LogWithFields("HANDL-FdN0b", "seq", event.Sequence(), "expectedType", user.HumanEmailVerifiedType).Error("wrong event type")
@@ -578,7 +578,7 @@ func (p *UserProjection) reduceHumanEmailVerified(event eventstore.EventReader)
), nil
}
func (p *UserProjection) reduceHumanAvatarAdded(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanAvatarAdded(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanAvatarAddedEvent)
if !ok {
logging.LogWithFields("HANDL-naQue", "seq", event.Sequence(), "expectedType", user.HumanAvatarAddedType).Error("wrong event type")
@@ -608,7 +608,7 @@ func (p *UserProjection) reduceHumanAvatarAdded(event eventstore.EventReader) (*
), nil
}
func (p *UserProjection) reduceHumanAvatarRemoved(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceHumanAvatarRemoved(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.HumanAvatarRemovedEvent)
if !ok {
logging.LogWithFields("HANDL-c6zoV", "seq", event.Sequence(), "expectedType", user.HumanAvatarRemovedType).Error("wrong event type")
@@ -638,7 +638,7 @@ func (p *UserProjection) reduceHumanAvatarRemoved(event eventstore.EventReader)
), nil
}
func (p *UserProjection) reduceMachineAdded(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceMachineAdded(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.MachineAddedEvent)
if !ok {
logging.LogWithFields("HANDL-8xr78", "seq", event.Sequence(), "expectedType", user.MachineAddedEventType).Error("wrong event type")
@@ -669,7 +669,7 @@ func (p *UserProjection) reduceMachineAdded(event eventstore.EventReader) (*hand
), nil
}
func (p *UserProjection) reduceMachineChanged(event eventstore.EventReader) (*handler.Statement, error) {
func (p *UserProjection) reduceMachineChanged(event eventstore.Event) (*handler.Statement, error) {
e, ok := event.(*user.MachineChangedEvent)
if !ok {
logging.LogWithFields("HANDL-uUFCy", "seq", event.Sequence(), "expectedType", user.MachineChangedEventType).Error("wrong event type")