Documentation
¶
Index ¶
Constants ¶
View Source
const ( NameKey = "name" DescriptionKey = "description" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
owner.Owner `bson:",inline" validate:"recurse"`
archive.Archive `bson:",inline" validate:"recurse"`
Name *string `json:"name" conform:"upper,trim" validate:"nnpt"`
Description *string `json:"description" conform:"ucfirst,trim" validate:"nnpt"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
func (*Core) GetDescription ¶
func (*Core) SetDescription ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithArchive ¶
func WithArchive(x archive.Archive) CoreOption
func WithDescription ¶
func WithDescription(x string) CoreOption
func WithName ¶
func WithName(x string) CoreOption
func WithOwner ¶
func WithOwner(x owner.Owner) CoreOption
type MetaOption ¶
type MetaOption = contract.MetaOption[Meta]
func WithCommon ¶
func WithCommon(x common.Common) MetaOption
type Quantifier ¶
type Quantifier struct {
Meta `bson:",inline" validate:"recurse"`
Comp `bson:",inline" validate:"recurse"`
Core `bson:",inline" validate:"recurse"`
}
Quantifier represents the unit of measure used for charges.
func Mock ¶
func Mock(o owner.Owner) *Quantifier
func New ¶
func New(m Meta, cr Core) *Quantifier
Click to show internal directories.
Click to hide internal directories.