owner

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	OwnerIDKey = "owner_id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comp

type Comp struct{}

func ApplyComp

func ApplyComp(c *Comp, modifiers ...CompOption) Comp

type CompOption

type CompOption = contract.CompOption[Comp]

type Core

type Core struct {
	OwnerID *contract.ID `json:"owner_id" validate:"nnpt,nz"`
}

func ApplyCore

func ApplyCore(c *Core, modifiers ...CoreOption) Core

func (*Core) GetOwnerID

func (c *Core) GetOwnerID() contract.ID

func (*Core) SetOwnerID

func (c *Core) SetOwnerID(x contract.ID)

type CoreOption

type CoreOption = contracti.CoreOption[Core]

func WithOwnerID

func WithOwnerID(x contract.ID) CoreOption

type Meta

type Meta struct{}

func ApplyMeta

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

type MetaOption

type MetaOption = contract.MetaOption[Meta]

type Owner

type Owner struct {
	Meta `bson:",inline"`
	Comp `bson:",inline"`
	Core `bson:",inline"`
}

Owner represents the owner of a document.

func NewOwner

func NewOwner(m Meta, c Comp, cr Core) *Owner

Jump to

Keyboard shortcuts

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