Documentation
¶
Index ¶
Constants ¶
View Source
const ( IndexOK string = "ok" // indexed title matched title of a demo IndexHidden = "hidden" // demo indexed but should not be displayed to end users (yet) IndexMissing = "missing" // title in index did not match the title of any demos IndexUnindexed = "unindexed" // demo's title was not found in index )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Demo ¶
type Demo struct { File string `json:"file"` // name of the demo's original archive file IndexState string `json:"index"` // "ok", "hidden", "missing" or "unindexed" Title string `json:"title"` // name shown to users in front-end Subtitle string `json:"subtitle"` // short clarification of the title Tags []string `json:"tags,omitempty"` // set of terms relating to this demo Description string `json:"description"` // full description of what the demo is demonstrating (HTML) Input string `json:"input"` // input text to be re-formatted Features []string `json:"show,omitempty"` // which features to show in the UI Reset bool `json:"reset"` // reset options when loading this demo Options map[string]string `json:"options,omitempty"` // optional values to be pre-set Data map[string][]string `json:"data,omitempty"` // optional set of values to provide for each options }
structure sent to UI front end
Note:
- all fields can be set via yaml in the -- demo -- section of a txtar archive
- goccy/go-yaml uses json tags if yaml tags are missing
Click to show internal directories.
Click to hide internal directories.