owner

package
v0.0.331 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	OwnerIDKey = "owner_id"
)

Variables

Functions

func Idx added in v0.0.30

func Idx(p ...string) []contract.IndexEntry

func IdxSrch added in v0.0.30

func IdxSrch(p ...string) []contract.SearchIndexEntry

func Rules added in v0.0.24

Types

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" validate:"recurse"`
	Core `bson:",inline" validate:"recurse"`
}

Owner represents the owner of a document.

func Mock added in v0.0.42

func Mock() *Owner

func New added in v0.0.15

func New(m Meta, cr Core) *Owner

Jump to

Keyboard shortcuts

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