Documentation
¶
Overview ¶
Package guide holds what a command group tells an author, or an agent, about how to build for it: the terms of its DSL or format, and the rules that its validate command applies, each with its fix. A group declares a Spec and Checks once. Its spec command prints the Spec, and its validate help and problems read the Checks. Thus the rules come from the binary, not from a skill or a page that can be out of date.
Index ¶
Constants ¶
const Generated = "<!-- Code generated by osapi dsl docs. DO NOT EDIT. -->"
Generated is the first line of the body of each page that a command of this binary writes. A writer removes a page with it that it did not write.
Variables ¶
This section is empty.
Functions ¶
func Fill ¶
Fill is page with the text between each pair of markers of name written again by render: <!-- osapi:<name> args --> starts the text, and <!-- /osapi:<name> --> ends it. render gets the args, the words after the name. A page keeps its own text around the markers. A start with no end is left as it is.
Types ¶
type Check ¶
type Check struct {
// Rule is the name that a problem reports.
Rule string `json:"rule"`
// Requires is what must be true.
Requires string `json:"requires"`
// Fix is how to fix what breaks the rule.
Fix string `json:"fix"`
}
Check is one rule that a validate command applies: what is required, and how to fix what breaks it.
type Checks ¶
type Checks []Check
Checks are the rules of a validate command, in order.
type Section ¶
type Section struct {
Kind string `json:"kind" render:"-"`
Title string `json:"title"`
Terms []Term `json:"terms" table:"blocks"`
}
Section is one kind of a Spec and its terms, as the spec command of a group prints them: a section for each kind, a block for each term.
type Spec ¶
Spec is every term of a DSL or format, in groups.
type Term ¶
type Term struct {
// Kind groups the term, as one of the Spec's Kinds names it.
Kind string `json:"kind" render:"-"`
// Name is how the term is written, such as Key("field").
Name string `json:"name"`
// Does is what the term makes osapi do.
Does string `json:"does" label:"-"`
// When is when to use it.
When string `json:"when" label:"Use"`
}
Term is one part of a DSL or format: how it is written, what it makes osapi do, and when to use it.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package sdktypes lists the closed sets of pkg/sdk/types in a spec, from the SDK's own description of them (types.All), as package collectors lists gohai's collectors.
|
Package sdktypes lists the closed sets of pkg/sdk/types in a spec, from the SDK's own description of them (types.All), as package collectors lists gohai's collectors. |