domain

package
v0.0.0-...-f47859d Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert[E Event](event Event) (E, error)

Types

type BaseEntity

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

func NewBaseEntity

func NewBaseEntity() *BaseEntity

func (*BaseEntity) AddDomainEvent

func (p *BaseEntity) AddDomainEvent(event Event)

func (*BaseEntity) DomainEvents

func (p *BaseEntity) DomainEvents() []Event

func (*BaseEntity) DomainEventsLength

func (p *BaseEntity) DomainEventsLength() int

func (*BaseEntity) HasDomainEvent

func (p *BaseEntity) HasDomainEvent() bool

func (*BaseEntity) LastEvent

func (p *BaseEntity) LastEvent() Event

func (*BaseEntity) PopEvent

func (p *BaseEntity) PopEvent() Event

type Command

type Command interface {
	Message
}

type Entity

type Entity interface {
	DomainEvents() []Event
	AddDomainEvent(Event)
	HasDomainEvent() bool
	DomainEventsLength() int
}

type Event

type Event interface {
	Message
}

type Message

type Message interface {
	TransactionID() string
	Name() string
}

Jump to

Keyboard shortcuts

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