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.