Documentation
¶
Overview ¶
Command genservice generates a microservice's boilerplate from its api package definition.go. Given an api package directory it generates client.go; given a service directory (with an <x>api subdirectory) it generates client.go, intermediate.go, mock.go, mock_test.go, and manifest.yaml, and syncs the godoc of each hand-written *Service handler method to its feature's description.
Usage: genservice [-check] <dir> [<dir>...]. Each dir may be a microservice directory or its api package; an api package belonging to a microservice regenerates all five artifacts, so either points at the same result. With -check, nothing is written; the command exits 2 if any output is out of date (a CI guard), 1 on error, 0 when everything is current.