Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConcurrency = errors.New("concurrency error")
ErrConcurrency when the currently saved version of the aggregate differs from the new ones
View Source
var ErrSnapshotNotFound = errors.New("snapshot not found")
ErrSnapshotNotFound returned when no snapshot is found in the snapshot store
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
AggregateID string
Version Version
GlobalVersion Version
AggregateType string
Timestamp time.Time
Reason string // based on the Data type
Data []byte // interface{} on the external Event type
Metadata []byte // map[string]interface{} on the external Event type
}
Event holding meta data and the application specific event in the Data property
type EventStore ¶
type EventStore interface {
Save(events []Event) error
Get(ctx context.Context, id string, aggregateType string, afterVersion Version) (Iterator, error)
}
EventStore interface expose the methods an event store must uphold
Click to show internal directories.
Click to hide internal directories.