microgen

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2017 License: MIT

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

Directories

Path Synopsis
cmd
test
svc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL