Skip to main content

Create

Write a new endpoint group that builds and passes its tests.

It writes internal/controller/endpoints/<name>/ in the osapi checkout in the current directory, and adds its import to internal/controller/endpoints/all. The group has a list and a get, an empty Deps and the tests of its methods. Then run the steps that it prints. While its Deps is empty, the controller needs no wiring. osapi controller endpoint spec get lists each part of the DSL.

osapi controller endpoint create [flags]

Examples​

osapi controller endpoint create --name trace --description "The traces of the controller"

Flags​

FlagDescriptionDefault
--descriptionWhat the group is, in one line (required)
--nameThe group's name: its path segment and CLI group (required)

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath to config file/etc/osapi/osapi.yaml

Output tells how the result is printed, and what --json gives.