folder

package
v0.0.315 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FolderNameKey        = "folder_name"
	FolderDescriptionKey = "folder_description"
)

Variables

View Source
var (
	FolderNameKeyFn        = contract.PathKeyFn(FolderNameKey)
	FolderDescriptionKeyFn = contract.PathKeyFn(FolderDescriptionKey)
)

Functions

func Idx

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

func IdxSrch

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

func Rules

Types

type Core

type Core struct {
	FolderName        *string `json:"folder_name" conform:"title,trim" validate:"nnpt,nz"`
	FolderDescription *string `json:"folder_description" conform:"ucfirst,trim" validate:"nnpt"`
}

func ApplyCore

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

func (*Core) GetFolderDescription added in v0.0.204

func (c *Core) GetFolderDescription() string

func (*Core) GetFolderName

func (c *Core) GetFolderName() string

func (*Core) SetFolderDescription added in v0.0.204

func (c *Core) SetFolderDescription(x string)

func (*Core) SetFolderName

func (c *Core) SetFolderName(x string)

type CoreOption

type CoreOption = contracti.CoreOption[Core]

func WithFolderDescription added in v0.0.204

func WithFolderDescription(x string) CoreOption

func WithFolderName

func WithFolderName(x string) CoreOption

type Folder

type Folder struct {
	Meta `bson:",inline" validate:"recurse"`
	Core `bson:",inline" validate:"recurse"`
}

Folder represents a folder.

func Mock

func Mock() *Folder

func New

func New(m Meta, cr Core) *Folder

type Meta

type Meta struct{}

func ApplyMeta

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

type MetaOption

type MetaOption = contract.MetaOption[Meta]

Jump to

Keyboard shortcuts

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