go-api-boilerplate: github.com/vardius/go-api-boilerplate/pkg/eventstore Index | Files | Directories

package eventstore

import "github.com/vardius/go-api-boilerplate/pkg/eventstore"

Package eventstore provides interfaces along with helper functions

Index

Package Files

doc.go errors.go event_store.go

Variables

var ErrEventNotFound = fmt.Errorf("event not found")

ErrEventNotFound is thrown when an event is not found in the store.

type EventStore Uses

type EventStore interface {
    Store(ctx context.Context, events []domain.Event) error
    Get(ctx context.Context, id uuid.UUID) (domain.Event, error)
    FindAll(ctx context.Context) ([]domain.Event, error)
    GetStream(ctx context.Context, streamID uuid.UUID, streamName string) ([]domain.Event, error)
}

EventStore methods allow to save, load events and event streams

Directories

PathSynopsis
dynamodbPackage memory provides dynamodb implementation of domain event store
memoryPackage memory provides memory implementation of domain event store
mysqlPackage eventstore provides mysql implementation of domain event store

Package eventstore imports 4 packages (graph) and is imported by 5 packages. Updated 2020-12-06. Refresh now. Tools for package owners.