event

package
v0.0.0-...-b6dc9e9 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEvent

type BaseEvent struct {
	// contains filtered or unexported fields
}

func NewBaseEvent

func NewBaseEvent(aggregateID string) BaseEvent

func (BaseEvent) AggregateId

func (b BaseEvent) AggregateId() string

func (BaseEvent) Id

func (b BaseEvent) Id() string

func (BaseEvent) OccurredOn

func (b BaseEvent) OccurredOn() time.Time

type Bus

type Bus interface {
	Publish(context.Context, []Event) error
	Subscribe(Type, Handler)
}

type Event

type Event interface {
	Id() string
	AggregateId() string
	OccurredOn() time.Time
	Type() Type
}

type Handler

type Handler interface {
	Handle(context.Context, Event) error
}

type Type

type Type string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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