domain

package
v0.0.0-...-ebe5785 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainEvent

type DomainEvent struct {
	Topic     string `json:"topic"`
	ProcessID string `json:"processID"`
	EventID   string `json:"eventID"`
	Account   string `json:"account"`
}

nolint:revive // I want this to be called DomainEvent because it's a Domain Driven Design concept.

func NewDomainEvent

func NewDomainEvent(topic, processID, eventID, account string) *DomainEvent

func (*DomainEvent) GetAccount

func (e *DomainEvent) GetAccount() string

func (*DomainEvent) GetEventID

func (e *DomainEvent) GetEventID() string

func (*DomainEvent) GetProcessID

func (e *DomainEvent) GetProcessID() string

func (*DomainEvent) GetTopic

func (e *DomainEvent) GetTopic() string

type EventAG

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

func (*EventAG) ClearDomainEvents

func (eag *EventAG) ClearDomainEvents()

func (*EventAG) PullDomainEvents

func (eag *EventAG) PullDomainEvents() []*DomainEvent

func (*EventAG) RecordDomainEvent

func (eag *EventAG) RecordDomainEvent(event *DomainEvent)

type EventBus

type EventBus interface {
	Publish(...DomainEvent) error
}

type IDomainEvent

type IDomainEvent interface {
	GetTopic() string
	GetProcessID() string
	GetEventID() string
	GetAccount() string
}

type Subscriber

type Subscriber interface {
	Consume(event []byte)
}

Jump to

Keyboard shortcuts

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