quantifier

package
v0.0.310 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameKey        = "name"
	DescriptionKey = "description"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comp

type Comp struct{}

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 (c *Core) GetDescription() string

func (*Core) GetName

func (c *Core) GetName() string

func (*Core) SetDescription

func (c *Core) SetDescription(x string)

func (*Core) SetName

func (c *Core) SetName(x string)

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 Meta

type Meta struct {
	common.Common `bson:",inline" validate:"recurse"`
}

func ApplyMeta

func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL