Documentation
¶
Index ¶
Constants ¶
View Source
const ( UIDKey = "uid" UsernameKey = "username" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core struct {
UID *string `json:"uid" validate:"nnpt,nz"`
Username *string `json:"username" conform:"trim" validate:"nnpt,nz"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
func (*Core) GetUsername ¶
func (*Core) SetUsername ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithUID ¶
func WithUID(x string) CoreOption
func WithUsername ¶
func WithUsername(x string) CoreOption
type MetaOption ¶
type MetaOption = contract.MetaOption[Meta]
func WithCommon ¶ added in v0.0.53
func WithCommon(x common.Common) MetaOption
type TmpUsername ¶
type TmpUsername struct {
Meta `bson:",inline" validate:"recurse"`
Comp `bson:",inline" validate:"recurse"`
Core `bson:",inline" validate:"recurse"`
}
TmpUsername holds a reserved username awaiting confirmation.
func Mock ¶
func Mock() *TmpUsername
func New ¶
func New(m Meta, cr Core) *TmpUsername
Click to show internal directories.
Click to hide internal directories.