linknotes

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Files

func Files(ctx context.Context, db bun.IDB, id, content string) error

Files links the note id to the images its content cites, in place of those it cited. Those of its account only: a note may cite the address of another account's.

func Items

func Items(ctx context.Context, db bun.IDB, items []domain.Item) error

Items runs Process on the notes among items that a trash or a restore just changed: the [[links]] waiting for their title may now name one note only.

func Process

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

Process makes the [[links]] of a note that name exactly one note point to its id, links the note to the notes its text points to, gives the links to it its new title, and resolves the [[links]] of the other notes that were waiting for its title. It also keeps the note's notes_on_files.

func Resolve

func Resolve(ctx context.Context, db bun.IDB, target string) (string, string, error)

Resolve gives the id and title of the one live note a target names, by path when it starts with /, else by title whatever its case; "" when no note, or several, match: the link waits.

Types

type Input

type Input struct {
	ID       string
	Content  string
	Title    string
	OldTitle string
}

Input is a note as just saved: its id, content and title ("" = untitled), and the title it had before this save when it changed.

Jump to

Keyboard shortcuts

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