Categorygithub.com/seedboxtech/eh-dynamo
modulepackage
0.1.5
Repository: https://github.com/seedboxtech/eh-dynamo.git
Documentation: pkg.go.dev

# README

Build Status Coverage Status GoDoc Go Report Card

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.
NewEventStoreWithDB creates a new EventStore with DB.
NewRepo creates a new Repo.

# 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.
EventStoreConfig is a config for the DynamoDB event store.
IndexInput is all the params we need to filter on an index.
Repo implements a DynamoDB repository for entities.
RepoConfig is a config for the DynamoDB event store.