Documentation
¶
Overview ¶
Package stickies keeps the sticky notes users put on Web UI pages.
A basedir holds one file, <basedir>/stickies.json, mapping a page key (the page's route inside the Web UI, an arbitrary string rather than a path) to the notes on that page. Notes are free-form reminders: no job, run, or result depends on them. Knows nothing of HTTP.
Index ¶
Constants ¶
const ( MaxNotesPerPage = 100 MaxPages = 1000 MaxTextRunes = 4000 MaxIDLength = 64 MaxPageKeyBytes = 1024 MaxCoordinate = 1e6 // Sizes are in pixels; a note of size 0 has the default size. MinWidth = 120 MinHeight = 80 MaxSize = 2000 )
Variables ¶
var Colors = []string{"yellow", "pink", "green", "blue", "orange"}
Colors are the colours a note may have; the first is the default.
Functions ¶
Types ¶
type Note ¶
type Note struct {
ID string `json:"id"`
Text string `json:"text"`
Color string `json:"color"`
X float64 `json:"x"`
Y float64 `json:"y"`
// Width and Height are the note's size in pixels, 0 for the default.
Width float64 `json:"width"`
Height float64 `json:"height"`
// CreatedAt is when the note was made, RFC 3339; Save fills it in for a
// note that has none.
CreatedAt string `json:"created_at"`
}
Note is one sticky note. X and Y are pixels from the page's top-left corner.
type Page ¶
Page is a page key with its notes.