editnote

package
v1.17.10 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 14 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")
	ErrNoContent = errors.New("no note content given")
	ErrNotFound  = errors.New("note not found")
)

Functions

func DropUnusedTags

func DropUnusedTags(ctx context.Context, db bun.IDB, ids []string) error

DropUnusedTags deletes, among ids, the tags left without any note. Also used by the purges of the trash.

func Process

func Process(ctx context.Context, db bun.IDB, input Input) *run

Types

type Input

type Input struct {
	ID      string
	Content string
	Tags    []string
}

Input is the whole new state of the note, its title comes from Content. Content ends up holding exactly Tags as #tags, so callers give hashtag.Parse(Content) when only the content changes.

Jump to

Keyboard shortcuts

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