Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLoadingSnapshot = fmt.Errorf("error loading snapshot")
ErrLoadingSnapshot is returned when a snapshot cannot be loaded
View Source
var ErrTableNameNotSet = fmt.Errorf("table name not set")
ErrTableNameNotSet is returned when the table name is not set
Functions ¶
This section is empty.
Types ¶
type SQLStore ¶
SQLStore is a store for snapshots that uses a SQL database as its backend. it is highly opinionated and expects there to be columns matching the sourcing.Snapshot struct that means there will be a column for the id, version, and data, and timestamp Further, every aggregate must have its own table as there is no "aggregate type" column it should use a schema that matches the following:
type VersionIntervalStrategy ¶
type VersionIntervalStrategy struct { EveryNth int Store sourcing.SnapshotStore }
func (*VersionIntervalStrategy) GetStore ¶
func (versionintervalstrategy *VersionIntervalStrategy) GetStore() sourcing.SnapshotStore
func (*VersionIntervalStrategy) ShouldSnapshot ¶
Click to show internal directories.
Click to hide internal directories.