A collection of code generation and libraries to for API development.
- Define your declarative API in
- APIs are defined by top-level protobuf messages in
- Run Solo Kit's code generation and import generated files as libraries into your application.
- These libraries provide an opinionated suite of tools for building a stateless, event-driven application.
- Currently only Go is supported, but other languages may be supported in the future.
- We are looking for community feedback and support!
test/generate.go for an example of how to use solo-kit
- clone repo to gopath
- gather dependencies:
dep ensure -v
- use binary produced with
make solo-kit-genor import
cmd.Run(...)into your own code gen code
- re-run whenever you change or add an api (.proto file)
- api objects generated from messages defined in protobuf files with magic comments prefixed with
solo-kit-genrecursively at the root of an
apidirectory containing one or more
- generated files have the
.sk.gosuffix (generated test files do not include this suffix)
solo-kit-gen will become deprecated in favor of a more robustly featured
sometime in the near future.
./solo-kit-gen -h Usage of ./solo-kit-gen: -docs generate docs as well (default true) -gogo compile normal gogo protos (default true) -i value import additional directories as proto roots (repeated flag, specify as many times as desired) -r string path to project absoluteRoot -s value skip generating for this directory (repeated flag, specify as many times as desired)