Versions in this module Expand all Collapse all v0 v0.15.6 Jun 13, 2022 Changes in this version + func NewCommandHandlerMiddleware() eh.CommandHandlerMiddleware + func NewEventHandlerMiddleware() eh.EventHandlerMiddleware + func RegisterContext() + type EventBus struct + func NewEventBus(eventBus eh.EventBus) *EventBus + func (b *EventBus) AddHandler(ctx context.Context, m eh.EventMatcher, h eh.EventHandler) error + func (b *EventBus) HandleEvent(ctx context.Context, event eh.Event) error + type EventStore struct + func NewEventStore(eventStore eh.EventStore) *EventStore + func (s *EventStore) Load(ctx context.Context, id uuid.UUID) ([]eh.Event, error) + func (s *EventStore) Save(ctx context.Context, events []eh.Event, originalVersion int) error + type Outbox struct + func NewOutbox(outbox eh.Outbox) *Outbox + func (b *Outbox) AddHandler(ctx context.Context, m eh.EventMatcher, h eh.EventHandler) error + func (b *Outbox) HandleEvent(ctx context.Context, event eh.Event) error + type Repo struct + func IntoRepo(ctx context.Context, repo eh.ReadRepo) *Repo + func NewRepo(repo eh.ReadWriteRepo) *Repo + func (r *Repo) Find(ctx context.Context, id uuid.UUID) (eh.Entity, error) + func (r *Repo) FindAll(ctx context.Context) ([]eh.Entity, error) + func (r *Repo) InnerRepo(ctx context.Context) eh.ReadRepo + func (r *Repo) Remove(ctx context.Context, id uuid.UUID) error + func (r *Repo) Save(ctx context.Context, entity eh.Entity) error