Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSnapshotStore ¶
Types ¶
type DB ¶
type DB interface { PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error) QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row }
type EventStore ¶
type EventStore struct {
// contains filtered or unexported fields
}
func NewEventStore ¶
func NewEventStore(tableName string, db DB, registry registry.Registry) EventStore
func (EventStore) Load ¶
func (s EventStore) Load(ctx context.Context, aggregate es.EventSourcedAggregate) (err error)
func (EventStore) Save ¶
func (s EventStore) Save(ctx context.Context, aggregate es.EventSourcedAggregate) (err error)
type InboxStore ¶
type InboxStore struct {
// contains filtered or unexported fields
}
func NewInboxStore ¶
func NewInboxStore(tableName string, db DB) InboxStore
func (InboxStore) Save ¶
func (s InboxStore) Save(ctx context.Context, msg am.RawMessage) error
type OutboxStore ¶
type OutboxStore struct {
// contains filtered or unexported fields
}
func NewOutboxStore ¶
func NewOutboxStore(tableName string, db DB) OutboxStore
func (OutboxStore) FindUnpublished ¶
func (s OutboxStore) FindUnpublished(ctx context.Context, limit int) ([]am.RawMessage, error)
func (OutboxStore) MarkPublished ¶
func (s OutboxStore) MarkPublished(ctx context.Context, ids ...string) error
func (OutboxStore) Save ¶
func (s OutboxStore) Save(ctx context.Context, msg am.RawMessage) error
type SagaStore ¶
type SagaStore struct {
// contains filtered or unexported fields
}
func NewSagaStore ¶
type SnapshotStore ¶
type SnapshotStore struct { es.AggregateStore // contains filtered or unexported fields }
func (SnapshotStore) Load ¶
func (s SnapshotStore) Load(ctx context.Context, aggregate es.EventSourcedAggregate) error
func (SnapshotStore) Save ¶
func (s SnapshotStore) Save(ctx context.Context, aggregate es.EventSourcedAggregate) error
Click to show internal directories.
Click to hide internal directories.