Documentation
¶
Overview ¶
Package commandgen writes the cobra commands of a group of the command layer, gen/cli.go: one command for each method, with its help, its flags and its examples, for the local generator, the endpoint generator and the behavior generator alike. A local group's command runs its method in the CLI with command.Run; an endpoint group's sends a request with the endpoint layer's Run.
Index ¶
Constants ¶
const ExampleTraceID = "26e448c9dbe1c4a8d216a98c675079c9"
ExampleTraceID is the trace that each example output ends with, and ExampleNow is the time that an age in one is from, so a page is the same on each run. A sample output gives its times relative to ExampleNow.
Variables ¶
ExampleNow is the time that an age in an example output is from.
Functions ¶
func Commands ¶
Commands writes gen/cli.go: one cobra command for each method, with its help, its permission, its examples and a flag for each input field, and the init that registers them under osapi client <group>, or under osapi for a local group.
func Outputs ¶
Outputs are the outputs of the examples of m: each example that Prints gave one, or, for a method that answers with no body, each example without --json. For each, the command line and what the CLI prints for it, in a fenced ansi block, then what --json prints. line is the command with its group, such as osapi client agent list.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Command generate writes the files that come from the local groups: for each group, the cobra commands in gen/cli.go, and internal/cli/commands/all/gen, which registers every group's commands.
|
Command generate writes the files that come from the local groups: for each group, the cobra commands in gen/cli.go, and internal/cli/commands/all/gen, which registers every group's commands. |
|
Package genfile writes generated files for the local, endpoint and behavior generators alike: it removes the files a run made before, writes each file under the repository's root, and groups a Go file's imports as the repository does.
|
Package genfile writes generated files for the local, endpoint and behavior generators alike: it removes the files a run made before, writes each file under the repository's root, and groups a Go file's imports as the repository does. |