event

package
v0.0.0-...-1bb7b75 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 2 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 (receiver BaseEvent) AggregateID() string

func (BaseEvent) ID

func (receiver BaseEvent) ID() string

func (BaseEvent) OccurredOn

func (receiver BaseEvent) OccurredOn() time.Time

type Bus

type Bus interface {
	Publish([]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(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