Versions in this module Expand all Collapse all v0 v0.0.1 Apr 16, 2026 Changes in this version + var ErrNoEvents = errors.New("no events to append") + var ErrOptimisticConcurrency = errors.New("optimistic concurrency conflict") + type AggregateStreamReader interface + ReadAggregateStream func(ctx context.Context, tx *sql.Tx, aggregateType string, aggregateID string, ...) (Stream, error) + type AppendResult struct + Events []PersistedEvent + GlobalPositions []int64 + func (r AppendResult) FromVersion() int64 + func (r AppendResult) ToVersion() int64 + type Event struct + AggregateID string + AggregateType string + CausationID NullString + CorrelationID NullString + CreatedAt time.Time + EventID uuid.UUID + EventType string + EventVersion int + Metadata []byte + Payload []byte + TraceID NullString + type EventReader interface + ReadEvents func(ctx context.Context, tx *sql.Tx, fromPosition int64, limit int) ([]PersistedEvent, error) + type EventStore interface + Append func(ctx context.Context, tx *sql.Tx, expectedVersion ExpectedVersion, ...) (AppendResult, error) + type ExpectedVersion struct + func Any() ExpectedVersion + func Exact(version int64) ExpectedVersion + func NoStream() ExpectedVersion + func (ev ExpectedVersion) IsAny() bool + func (ev ExpectedVersion) IsExact() bool + func (ev ExpectedVersion) IsNoStream() bool + func (ev ExpectedVersion) String() string + func (ev ExpectedVersion) Value() int64 + type GlobalPositionReader interface + GetLatestGlobalPosition func(ctx context.Context, tx *sql.Tx) (int64, error) + type Logger interface + Debug func(ctx context.Context, msg string, keyvals ...interface{}) + Error func(ctx context.Context, msg string, keyvals ...interface{}) + Info func(ctx context.Context, msg string, keyvals ...interface{}) + type NoOpLogger struct + func (NoOpLogger) Debug(_ context.Context, _ string, _ ...interface{}) + func (NoOpLogger) Error(_ context.Context, _ string, _ ...interface{}) + func (NoOpLogger) Info(_ context.Context, _ string, _ ...interface{}) + type NullString struct + String string + Valid bool + func (ns *NullString) Scan(value interface{}) error + func (ns NullString) Value() (driver.Value, error) + type PersistedEvent struct + AggregateID string + AggregateType string + AggregateVersion int64 + CausationID NullString + CorrelationID NullString + CreatedAt time.Time + EventID uuid.UUID + EventType string + EventVersion int + GlobalPosition int64 + Metadata []byte + Payload []byte + TraceID NullString + type Stream struct + AggregateID string + AggregateType string + Events []PersistedEvent + func (s Stream) IsEmpty() bool + func (s Stream) Len() int + func (s Stream) Version() int64