Documentation ¶
Index ¶
- Variables
- type EventStore
- func (s *EventStore) CreateTable(ctx context.Context) error
- func (s *EventStore) DeleteTable(ctx context.Context) error
- func (s *EventStore) Load(ctx context.Context, aggregateType eh.AggregateType, id eh.UUID) ([]eh.Event, error)
- func (s *EventStore) Save(ctx context.Context, events []eh.Event, originalVersion int) error
- type EventStoreConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCouldNotClearDB = errors.New("could not clear database")
ErrCouldNotClearDB is when the database could not be cleared.
View Source
var ErrCouldNotLoadAggregate = errors.New("could not load aggregate")
ErrCouldNotLoadAggregate is when an aggregate could not be loaded.
View Source
var ErrCouldNotMarshalEvent = errors.New("could not marshal event")
ErrCouldNotMarshalEvent is when an event could not be marshaled into BSON.
View Source
var ErrCouldNotSaveAggregate = errors.New("could not save aggregate")
ErrCouldNotSaveAggregate is when an aggregate could not be saved.
View Source
var ErrCouldNotUnmarshalEvent = errors.New("could not unmarshal event")
ErrCouldNotUnmarshalEvent is when an event could not be unmarshaled into a concrete type.
Functions ¶
This section is empty.
Types ¶
type EventStore ¶
type EventStore struct {
// contains filtered or unexported fields
}
EventStore implements an EventStore for MongoDB.
func NewEventStore ¶
func NewEventStore(config *EventStoreConfig) (*EventStore, error)
NewEventStore creates a new EventStore.
func (*EventStore) CreateTable ¶
func (s *EventStore) CreateTable(ctx context.Context) error
CreateTable creates the table if it is not allready existing and correct.
func (*EventStore) DeleteTable ¶
func (s *EventStore) DeleteTable(ctx context.Context) error
DeleteTable deletes the event table.
type EventStoreConfig ¶
EventStoreConfig is a config for the DynamoDB event store.
Click to show internal directories.
Click to hide internal directories.