events

package
v0.0.0-...-5dae249 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateDB

type AggregateDB struct {
	ID       string `bson:"_id"`
	Category string
	Version  int       `bson:"version"`
	Events   []EventDB `bson:"events"`
}

type Event

type Event interface {
	EventCategory() string
	EventType() string
	AggregateID() string
	Data() bson.M
	ToProto() proto.Message
}

type EventDB

type EventDB struct {
	AggregateID string    `bson:"_id"`
	Timestamp   time.Time `bson:"timestamp"`
	Category    string    `bson:"category"`
	Type        string    `bson:"type"`
	Data        bson.M    `bson:"data"`
}

Jump to

Keyboard shortcuts

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