editnote

package
v0.0.0-...-4d14c86 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 14 Imported by: 0

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
⌂ 换网址