Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(db bun.IDB) http.HandlerFunc
Handler finds notes by title or content: GET /api/search?q=&limit=&offset=, X-Total-Count counting the matches. @Summary Find notes by title or content @Description The text in the title first, then in a heading, then the notes with the most backlinks, the latest edited, by path. @Tags search @Produce json @Param q query string true "text to find" @Param limit query integer false "matches in the page, all when left out or 0" @Param offset query integer false "matches skipped before the page" @Success 200 {array} searchnotes.Match @Header 200 {integer} X-Total-Count "the matches, not only the page: those read, and the notes after them that may match" @Failure 400 {object} respond.Failure @Failure 500 {object} respond.Failure @Router /api/search [get]
Types ¶
This section is empty.