x

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateStore

type AggregateStore interface {
	Load(aggregateID cqrs.Identifier, aggregateType string) (cqrs.ESAggregate, error)
	Store(aggregate cqrs.ESAggregate, events ...cqrs.DomainEvent) error
}

AggregateStore loads and stores the aggregate.

type EventHandler

type EventHandler interface {
	SubscribedTo() cqrs.EventMatcher
	Handle(cqrs.DomainEvent) error
}

EventHandler handles events that were published though EventPublisher.

type EventHandlerFunc

type EventHandlerFunc func(cqrs.DomainEvent) error

EventHandlerFunc is a function that can be used as an event handler.

type EventPublisher

type EventPublisher interface {
	Publish(e ...cqrs.DomainEvent) error
}

EventPublisher publishes events.

type EventStore

type EventStore interface {
	LoadEventsFor(aggregateID cqrs.Identifier) ([]cqrs.DomainEvent, error)
	StoreEventsFor(aggregateID cqrs.Identifier, version int, events []cqrs.DomainEvent) error
}

EventStore stores and loads events.

Jump to

Keyboard shortcuts

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