eventstore

package
v0.0.1-0...-6deec57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 4 Imported by: 0

README

eventstore GoDoc

Package eventstore provides event store interfaces Download:

go get -u github.com/bradishungry/go-api-learning/pkg/eventstore

Package eventstore provides event store interfaces

Documentation

Overview

Package eventstore provides interfaces along with helper functions

Index

Constants

This section is empty.

Variables

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

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

Functions

This section is empty.

Types

type EventStore

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)
	GetStreamEventsByType(ctx context.Context, streamID uuid.UUID, streamName, eventType string) ([]*domain.Event, error)
}

EventStore methods allow to save, load events and event streams

Directories

Path Synopsis
Package eventstore provides sqllite implementation of domain event store
Package eventstore provides sqllite implementation of domain event store

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL