Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCouldNotUnmarshalGivenType = errors.New("could not unmarshal given type")
Functions ¶
Types ¶
type KeyedMapper ¶
type Merger ¶
type Merger[TParent, TChildren any] func(TParent, TChildren) TParent // Merger function to handle relations by configuring how an item should be merged
type Paginated ¶
type Paginated[T any] struct { Data []T `json:"data"` Page int `json:"page"` IsFirstPage bool `json:"first_page"` IsLastPage bool `json:"last_page"` PerPage int `json:"per_page"` Total int `json:"total"` }
Represents paginated data set.
type Scanner ¶
Deserialize a storage row to field. This is the interface making possible the rehydration of domain entities from the db since all fields are private to enforce invariants and encapsulation.
Since domain store will always constructs an aggregate as a whole, it makes the process relatively easy to keep under control.
The things to keep in mind is the order used when scanning which should always be the same.
IMPORTANT: it will fails if the type of a monad.Value is not a primitive type or does not implements the sql.Scanner interface.
Click to show internal directories.
Click to hide internal directories.