Documentation
¶
Overview ¶
Package ddd provides types for tactical Domain-Driven Design (DDD).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateRoot ¶
type AggregateRoot[ID comparable, SerializationType any] interface { // ID uniquely identifies the entity. ID() ID // Serialize returns a serialization for persistence implementations. Serialize() SerializationType }
AggregateRoot is embedded into structs that represent DDD aggregate roots.
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
Entity is embedded into structs that represent DDD entities.
type Serialization ¶
type Serialization[AggregateRoot any] interface { Deserialize() AggregateRoot }
Serialization is the serialized representation of an aggregate root.
A Serialization should contain all the data necessary to persist an aggregate. They are expected to only have exported fields and to contain no business logic. They are commonly used by persistence implementations to deserialize persisted data back into entities.
Click to show internal directories.
Click to hide internal directories.