esam

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 1 Imported by: 0

README

esam

Esam, Event Sourcing for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventMetadata

type EventMetadata struct {
	EventID   string
	Name      string
	Data      string
	UserId    string
	Timestamp int64
}

type EventProjection

type EventProjection interface {
	Process(em EventMetadata) (err error)
}

type EventStore

type EventStore interface {
	Store(eventName string, data interface{}, userId string, timestamp int64) (id string, err error)
	Next(id string) (em *EventMetadata, err error)
}

type Projection

type Projection interface {
	RegisterEvent(eventName string, target EventProjection) (err error)
	Project(ctx context.Context)
}

Directories

Path Synopsis
driver

Jump to

Keyboard shortcuts

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