Documentation
¶
Overview ¶
Package views loads saved queries from <vault>/.nota/views/*.yaml and evaluates them through the index. A view is a virtual folder:
name: Drafts
icon: pen
where: { status: draft }
tag: projekt
folder: Projekt
sort: updated desc
limit: 50
Every field except name is optional. where matches frontmatter values (case-insensitive, list items included); tag includes nested tags.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type View ¶
type View struct {
// ID is the file name without extension; `nota ls --view ID` uses it.
ID string `yaml:"-" json:"id"`
Name string `yaml:"name" json:"name"`
Icon string `yaml:"icon,omitempty" json:"icon,omitempty"`
Where map[string]any `yaml:"where,omitempty" json:"where,omitempty"`
Tag string `yaml:"tag,omitempty" json:"tag,omitempty"`
Folder string `yaml:"folder,omitempty" json:"folder,omitempty"`
Sort string `yaml:"sort,omitempty" json:"sort,omitempty"`
Limit int `yaml:"limit,omitempty" json:"limit,omitempty"`
// File is the vault-relative path of the definition.
File string `yaml:"-" json:"file"`
}
View is one saved query.