mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
refactor(eventstore): rename EventPusher to Command, EventReader to Event, PushEvents to Push and FilterEvents to Filter (#2907)
This commit is contained in:
@@ -6,16 +6,16 @@ import "time"
|
||||
// It implements a basic reducer
|
||||
// it's purpose is to reduce events to create new ones
|
||||
type WriteModel struct {
|
||||
AggregateID string `json:"-"`
|
||||
ProcessedSequence uint64 `json:"-"`
|
||||
Events []EventReader `json:"-"`
|
||||
ResourceOwner string `json:"-"`
|
||||
ChangeDate time.Time `json:"-"`
|
||||
AggregateID string `json:"-"`
|
||||
ProcessedSequence uint64 `json:"-"`
|
||||
Events []Event `json:"-"`
|
||||
ResourceOwner string `json:"-"`
|
||||
ChangeDate time.Time `json:"-"`
|
||||
}
|
||||
|
||||
//AppendEvents adds all the events to the read model.
|
||||
// The function doesn't compute the new state of the read model
|
||||
func (rm *WriteModel) AppendEvents(events ...EventReader) {
|
||||
func (rm *WriteModel) AppendEvents(events ...Event) {
|
||||
rm.Events = append(rm.Events, events...)
|
||||
}
|
||||
|
||||
@@ -38,6 +38,6 @@ func (wm *WriteModel) Reduce() error {
|
||||
|
||||
// all events processed and not needed anymore
|
||||
wm.Events = nil
|
||||
wm.Events = []EventReader{}
|
||||
wm.Events = []Event{}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user