Documentation
¶
Overview ¶
Package docs holds the dashboard's in-app manual (PRD §25.4, ADR-072): a directory of Markdown files with a YAML front-matter, embedded in the binary and parsed once at boot into what the API serves.
The corpus lives beside this parser rather than under docs/ because go:embed cannot reach above its own package directory. They are still ordinary Markdown files, reviewed like any other prose.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Link ¶
type Link struct {
Label string `json:"label"`
Route string `json:"route,omitempty"`
Href string `json:"href,omitempty"`
}
Link points out of the manual: a dashboard route, or an absolute URL.
type Manual ¶
type Manual struct {
Topics []Topic
}
Manual is the parsed corpus, in the order the groups are meant to be read.
type Section ¶
type Section struct {
ID string `json:"id"`
Title string `json:"title"`
Permission string `json:"permission,omitempty"`
Root bool `json:"root,omitempty"`
HTML string `json:"html"`
Text string `json:"text"`
}
Section is a `##` heading and everything under it, up to the next one.
type Topic ¶
type Topic struct {
ID string `json:"id"`
Title string `json:"title"`
Icon string `json:"icon,omitempty"`
Group string `json:"group"`
Summary string `json:"summary"`
Permission string `json:"permission,omitempty"`
Root bool `json:"root,omitempty"`
Links []Link `json:"links,omitempty"`
IntroHTML string `json:"intro_html,omitempty"`
IntroText string `json:"intro_text,omitempty"`
Sections []Section `json:"sections"`
// contains filtered or unexported fields
}
Topic is one chapter: its front-matter, the prose before the first heading, and its `##` sections in document order.
type Validator ¶
type Validator struct {
KnownPermission func(string) bool
KnownIcon func(string) bool
KnownRoute func(string) bool
}
Validator is what a caller supplies to have the corpus checked against the rest of the build: the permission catalogue, the icons that ship, the routes that exist. Kept as functions rather than as imports so this package does not pull the dashboard's asset list or the auth catalogue into every consumer — and so a test can validate a fixture without either.