Documentation
¶
Index ¶
Constants ¶
View Source
const (
IsDefaultKey = "is_default"
)
Variables ¶
View Source
var IsDefaultKeyFn = helper.PathKeyFn(IsDefaultKey)
Functions ¶
func Idx ¶
func Idx(p ...string) []contract.IndexEntry
func IdxSrch ¶
func IdxSrch(p ...string) []contract.SearchIndexEntry
func Rules ¶
func Rules(p ...string) contractpkg.QueryParamRules
Types ¶
type Core ¶
type Core struct {
IsDefault *bool `json:"is_default" validate:"nnpt"`
}
func ApplyCore ¶
func ApplyCore(c *Core, modifiers ...CoreOption) Core
func (*Core) GetIsDefault ¶
func (*Core) SetIsDefault ¶
type CoreOption ¶
type CoreOption = contracti.CoreOption[Core]
func WithIsDefault ¶
func WithIsDefault(x bool) CoreOption
type DefaultV ¶
type DefaultV struct {
Meta `bson:",inline" validate:"recurse"`
Core `bson:",inline" validate:"recurse"`
}
DefaultV provides a mechanism to flag documents as default.
type Meta ¶
type Meta struct{}
func ApplyMeta ¶
func ApplyMeta(m *Meta, modifiers ...MetaOption) Meta
type MetaOption ¶
type MetaOption = contract.MetaOption[Meta]
Click to show internal directories.
Click to hide internal directories.