Releases: hallgren/eventsourcing
Releases · hallgren/eventsourcing
snapshotstore/sql/v0.1.0
SQL snapshot store building on the Snapshot struct and the SnapshotStore interface from the core/v0.4.0 module.
core/v0.4.0
Added Snapshot support to the core module. This include the Snapshot struct:
// Snapshot holds current state of an aggregate
type Snapshot struct {
ID string
Type string
Version Version
GlobalVersion Version
State []byte
}
And the SnapShotStore interface to be implemented by different storage backends.
// SnapshotStore expose the methods a snapshot store must uphold
type SnapshotStore interface {
Save(snapshot Snapshot) error
Get(ctx context.Context, id, aggregateType string) (Snapshot, error)
}
v0.3.0
eventstore/sql/v0.3.0
Use core/v0.3.0
eventstore/esdb/v0.3.0
Use core/v0.3.0
eventstore/bbolt/v0.3.0
Use core/v0.3.0
core/v0.3.0
Change the Iterator interface
type Iterator interface {
Next() bool
Value() (Event, error)
Close()
}
It's easier to signal when the there is no more events to return with the Next()
method. Before that was signaled with errors.
Removed the errors that was used to signal if there was no events to fetch or no more events to fetch.
// ErrNoEvents when there is no events to get
var ErrNoEvents = errors.New("no events")
// ErrNoMoreEvents when iterator has no more events to deliver
var ErrNoMoreEvents = errors.New("no more events")
v0.2.0
eventstore/sql/v0.2.1
Same as eventstore/sql/v0.2.0 but with correct version format.
eventstore/sql/v0.2.0
- Start use v0.2.0 of the core module.
- Stop using the event validator function from the core module.
- Return the core.ErrConcurrently error when saving events that are out of order.