readgraph

package
v1.17.5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 7 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

This section is empty.

Functions

func Graph

func Graph(db bun.IDB) http.HandlerFunc

Graph gives the graph around a note, laid out: its tags, the notes sharing one, its [[links]] either way: GET /api/notes/{id}/graph. @Summary Read the graph around a note, laid out @Tags notes @Produce json @Param id path string true "uuid" @Success 200 {object} readgraph.Result @Failure 404 {object} respond.Failure @Failure 500 {object} respond.Failure @Router /api/notes/{id}/graph [get]

func Handler

func Handler(db bun.IDB) http.HandlerFunc

Handler gives every tag with how many notes carry it, most used first: GET /api/graph. @Summary Count the notes of every tag, most used first @Tags graph @Produce json @Success 200 {array} counttags.TagCount @Failure 500 {object} respond.Failure @Router /api/graph [get]

func List

func List(db bun.IDB) http.HandlerFunc

List gives the live notes whose title or path holds q, their id, title and path, for the [[ menu: GET /api/notes?q=. A few dozen at most: the whole list weighs 7 MB at 50,000 notes (#150). @Summary Find the notes by title or path @Tags notes @Produce json @Param q query string false "text of the title or the path" @Success 200 {array} readgraph.Note @Failure 500 {object} respond.Failure @Router /api/notes [get]

func Neighbors

func Neighbors(db bun.IDB) http.HandlerFunc

Neighbors gives a note and the notes sharing its tags: GET /api/notes/{id}/neighbors. @Summary Read a note and the notes sharing its tags @Tags notes @Produce json @Param id path string true "uuid" @Success 200 {object} readneighbors.Result @Failure 404 {object} respond.Failure @Failure 500 {object} respond.Failure @Router /api/notes/{id}/neighbors [get]

func Notes

func Notes(db bun.IDB) http.HandlerFunc

Notes gives every live note with its tags, and the [[links]] between them, laid out: GET /api/graph/notes. The account's layout is kept by the server, computed again only when the graph changed; layout=false skips it. @Summary Read every note with its tags, and the links between them, laid out @Tags graph @Produce json @Param layout query bool false "false: no layout, the notes without x and y, sorted by id" @Success 200 {object} readgraph.Result @Failure 500 {object} respond.Failure @Router /api/graph/notes [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

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