Versions in this module Expand all Collapse all v0 v0.15.6 Jun 13, 2022 Changes in this version + type EventStore struct + func NewEventStore(uri, dbName string, options ...Option) (*EventStore, error) + func NewEventStoreWithClient(client *mongo.Client, dbName string, options ...Option) (*EventStore, error) + func (s *EventStore) Clear(ctx context.Context) error + func (s *EventStore) Close() error + func (s *EventStore) Load(ctx context.Context, id uuid.UUID) ([]eh.Event, error) + func (s *EventStore) RenameEvent(ctx context.Context, from, to eh.EventType) error + func (s *EventStore) Replace(ctx context.Context, event eh.Event) error + func (s *EventStore) Save(ctx context.Context, events []eh.Event, originalVersion int) error + type Option func(*EventStore) error + func WithCollectionNames(eventsColl, streamsColl string) Option + func WithEventHandler(h eh.EventHandler) Option + func WithEventHandlerInTX(h eh.EventHandler) Option