event

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 1 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[T any] struct {
	Type          string    `json:"type"`
	OccurredAt    time.Time `json:"timestamp"`
	Payload       T         `json:"data"`
	AggregateID   string    `json:"aggregate_id,omitempty"`
	AggregateName string    `json:"aggregate_name,omitempty"`
}

DomainEvent 领域事件

func NewDomainEvent added in v0.5.2

func NewDomainEvent[T any](eventType string, aggregateID string, aggregateName string, data T) DomainEvent[T]

NewDomainEvent 创建领域事件

Jump to

Keyboard shortcuts

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