owner

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IDKey = "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 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"`
	// OwnerID is the ID of the owner of the document.
	// example:123e4567-e89b-12d3-a456-426655440000
	// required:true
	OwnerID *contract.ID `bson:"owner_id" json:"owner_id" validate:"nonnilpointer,nonzeropointerelem"`
}

Owner represents the owner of a document. swagger:model

func NewOwner

func NewOwner(m Meta, c Comp, ownerID contract.ID) *Owner

func (*Owner) GetOwnerID

func (o *Owner) GetOwnerID() contract.ID

func (*Owner) SetOwnerID

func (o *Owner) SetOwnerID(x contract.ID)

Jump to

Keyboard shortcuts

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