Categorygithub.com/sysbot/eh-dynamodb
modulepackage
0.0.5
Repository: https://github.com/sysbot/eh-dynamodb.git
Documentation: pkg.go.dev

# README

Event Horizon Dynamo

Event Horizon Dynamo contains the DynamoDB driver for Event Horizon a CQRS/ES toolkit for Go.

Usage

See the Event Horizon example folder for a few examples to get you started and replace the storage drivers (event store and/or repo)

Development

To develop Event Horizon Dynamo you need to have Docker and Docker Compose installed.

To start all needed services and run all tests, simply run make:

make

To manually run the services and stop them:

make services
make stop

When the services are running testing can be done either locally or with Docker:

make test
make test_docker
go test ./...

# Functions

NewEventStore creates a new EventStore.
NewRepo creates a new Repo.
WithDBName uses a custom DB name function.
WithEventHandler adds an event handler that will be called when saving events.
WithRepoDBName uses a custom DB name function.
No description provided by the author
WithPrefixAsDBName uses only the prefix as DB name, without namespace support.
WithDBName uses a custom DB name function.

# Variables

ErrCouldNotClearDB is when the database could not be cleared.
ErrCouldNotDialDB is when the database could not be dialed.
ErrCouldNotMarshalEvent is when an event could not be marshaled into BSON.
ErrCouldNotSaveAggregate is when an aggregate could not be saved.
ErrCouldNotUnmarshalEvent is when an event could not be unmarshaled into a concrete type.
ErrModelNotSet is when an model factory is not set on the Repo.

# Structs

EventStore implements an EventStore for DynamoDB.
IndexInput is all the params we need to filter on an index.
Repo implements a DynamoDB repository for entities.

# Type aliases

Option is an option setter used to configure creation.
Option is an option setter used to configure creation.