Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDomainEvent ¶
type BaseDomainEvent struct {
// contains filtered or unexported fields
}
BaseDomainEvent 基础领域事件
func NewBaseDomainEvent ¶
func NewBaseDomainEvent(eventType string, aggregateID uint64) BaseDomainEvent
func (BaseDomainEvent) AggregateID ¶
func (e BaseDomainEvent) AggregateID() uint64
func (BaseDomainEvent) EventID ¶
func (e BaseDomainEvent) EventID() uuid.UUID
func (BaseDomainEvent) EventType ¶
func (e BaseDomainEvent) EventType() string
func (BaseDomainEvent) OccurredOn ¶
func (e BaseDomainEvent) OccurredOn() time.Time
type DomainEvent ¶
type DomainEvent interface {
// EventID 返回事件的唯一标识符
EventID() uuid.UUID
// EventType 返回事件的类型名称
EventType() string
// AggregateID 返回触发该事件的聚合根ID
AggregateID() uint64
// OccurredOn 返回事件发生的时间戳
OccurredOn() time.Time
// EventData 返回事件的具体数据载荷
EventData() map[string]interface{}
}
DomainEvent 领域事件接口
Click to show internal directories.
Click to hide internal directories.