module
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Aug 16, 2017
License: MIT
Opens a new window with license information.
README
¶
Microgen
Tool to generate microservices, based on go-kit, by specified service interface.
Usage
microgen [OPTIONS]
Options
Name |
Default |
Description |
-file* |
|
Relative path to source file with service interface |
-interface* |
|
Service interface name in source file |
-out |
writes to stdout |
Relative or absolute path to directory, where you want to see generated files |
-package* |
|
Package path of your service interface source file |
-debug |
false |
Display some debug information |
-grpc |
false |
Render client, server and converters for gRPC protocol |
* Required option
Interface declaration rules
For correct generation, please, follow rules below.
- All interface method's arguments and results should be named and should be different (name duplicating unacceptable).
- First argument of each method should be of type
context.Context
(from standard library).
- Method results should contain at least one variable of
error
type.
- Some names are not allowed to be an argument or result.
- Field names in protobuf messages should be the same, as in interface methods (protobuf - snake_case, interface - camelCase).
Not allowed names:
req
request
resp
response
Misc
Microgen uses 0.9.* version of devimteam/go-kit
Click to show internal directories.
Click to hide internal directories.