Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DomainEvent ¶
type DomainEvent[T any, ID any] interface { SameEventAs(other T) bool ID() ID Kind() string When() time.Time }
DomainEvent is something that is unique, but does not have a lifecycle. The identity may be explicit, for example the sequence number of a payment, or it could be derived from various aspects of the event such as where, when and what has happened.
type EventDescriptor ¶ added in v1.2.1
func EventDescriptorFromEvent ¶ added in v1.2.1
func EventDescriptorFromEvent[T any, ID any](e DomainEvent[T, ID]) *EventDescriptor
func NewEventDescriptor ¶ added in v1.2.1
func NewEventDescriptor(body string, occurredAt time.Time, kind string) *EventDescriptor
type ValueObject ¶
ValueObject as described in the DDD book. Value objects compare by the values of their attributes, they don't have an identity.
Click to show internal directories.
Click to hide internal directories.