Versions in this module Expand all Collapse all v0 v0.1.9 Feb 20, 2022 Changes in this version type EventStoreConfig + TableName string v0.1.8 Feb 19, 2022 Changes in this version type EventStore + func (s *EventStore) Close() error v0.1.7 Feb 19, 2022 Changes in this version + var ErrCouldNotClearDB = errors.New("could not clear database") + var ErrCouldNotDialDB = errors.New("could not dial database") + var ErrCouldNotMarshalEvent = errors.New("could not marshal event") + var ErrCouldNotSaveAggregate = errors.New("could not save aggregate") + var ErrCouldNotUnmarshalEvent = errors.New("could not unmarshal event") + var ErrModelNotSet = errors.New("model not set") + type EventStore struct + func NewEventStore(config *EventStoreConfig) (*EventStore, error) + func NewEventStoreWithDB(config *EventStoreConfig, db *dynamo.DB) *EventStore + func (s *EventStore) CreateTable(ctx context.Context) error + func (s *EventStore) DeleteTable(ctx context.Context) error + func (s *EventStore) Load(ctx context.Context, id uuid.UUID) ([]eh.Event, error) + func (s *EventStore) LoadAll(ctx context.Context) ([]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 + func (s *EventStore) TableName(ctx context.Context) string + type EventStoreConfig struct + Endpoint string + Region string + TablePrefix string + type IndexInput struct + IndexName string + PartitionKey string + PartitionKeyValue interface{} + SortKey string + SortKeyValue interface{} + type Repo struct + func NewRepo(config *RepoConfig) (*Repo, error) + func (r *Repo) Find(ctx context.Context, id uuid.UUID) (eh.Entity, error) + func (r *Repo) FindAll(ctx context.Context) ([]eh.Entity, error) + func (r *Repo) FindWithFilter(ctx context.Context, expr string, args ...interface{}) ([]eh.Entity, error) + func (r *Repo) FindWithFilterUsingIndex(ctx context.Context, indexInput IndexInput, filterQuery string, ...) ([]eh.Entity, error) + func (r *Repo) Parent() eh.ReadRepo + func (r *Repo) Remove(ctx context.Context, id uuid.UUID) error + func (r *Repo) Save(ctx context.Context, entity eh.Entity) error + func (r *Repo) SetEntityFactory(f func() eh.Entity) + type RepoConfig struct + Endpoint string + Region string + TableName string