Documentation
¶
Overview ¶
Package genui writes the screens of a specification for the web in plain JavaScript: the logic of the specarch-gen-ui plug-in. Each list page becomes an HTML page and an ES module, the events of every page are declared once in events.js, and the theme becomes theme.css. Nothing needs a package, a bundler or a build step.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Diagnostic ¶
type Diagnostic struct {
File string `json:"file"`
Line int `json:"line"`
Severity string `json:"severity"`
Path string `json:"path"`
Rule string `json:"rule"`
Message string `json:"message"`
}
Diagnostic is one problem the plug-in reports, in the validator's fields.
type File ¶
type File struct {
Path string `json:"path"`
Content string `json:"content"`
// Comparison is "object-literal" for a file that is one object
// literal of data, which generate --check compares by value (ADR-093).
Comparison string `json:"comparison,omitempty"`
}
File is one file the plug-in answers with.
type Idiom ¶
type Idiom struct {
Name string `json:"name"`
As string `json:"as"`
Content map[string]any `json:"content,omitempty"`
Override map[string]any `json:"override,omitempty"`
}
Idiom is one idiom an implementation file uses.
type Implementation ¶
type Implementation struct {
File string `json:"file"`
Content map[string]any `json:"content"`
Settings map[string]any `json:"settings,omitempty"`
Idioms []Idiom `json:"idioms"`
}
Implementation is one implementation file in the request.
type Request ¶
type Request struct {
Specarch string `json:"specarch"`
Target string `json:"target"`
Root string `json:"root"`
Specification map[string]any `json:"specification"`
Implementations []Implementation `json:"implementations"`
Output string `json:"output"`
// Draft is the notice a draft carries, or "" for the approved output.
Draft string `json:"draft"`
// Problems are the problems to mark, in the order of the problems file.
Problems []mark.Problem `json:"problems"`
}
Request is what specarch writes on a plug-in's standard input.
Click to show internal directories.
Click to hide internal directories.