readitem

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoValue  = errors.New("no id given")
	ErrNotFound = errors.New("item not found")
)

Functions

func Process

func Process(ctx context.Context, db bun.IDB, kind domain.Kind, id string) *run

Process loads one item of the given kind that is not in the trash.

Types

type Result

type Result struct {
	Item     domain.Item   `json:"item"`
	Path     string        `json:"path"`
	Content  string        `json:"content,omitempty" binding:"optional"`
	Pinned   bool          `json:"pinned,omitempty" binding:"optional"`
	Readonly bool          `json:"readonly,omitempty" binding:"optional"` // locked: PATCH refuses its content and tags
	ForkOf   string        `json:"fork_of,omitempty" binding:"optional"`  // a fork: the note it merges back into
	Tags     []string      `json:"tags,omitzero" binding:"optional"`
	Children []domain.Item `json:"children,omitzero" binding:"optional"`
}

Result is the item and its path, with its content and tag values for a note, its direct children for a folder.

Jump to

Keyboard shortcuts

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