A tool for generating arbitrary code based on protobuf files using go templates & typescript.
Usage:
protogen [flags]
Flags:
--generator string directory containing the generator
-h, --help help for protogen
--out string output directory
--source string source directory / files
--include string include directories
Invoking the following command: protogen --generator ./mygenerator --out ./pkg/service --source ./api
will:
- Read all
*.proto
files in the./api
directory and parse them - Execute the
index.tsx
generator class in the./mygenerator
directory - Place all files generated in the
./pkg/service
directory
The examples
directory contains examples of generators.