Introduction¶
protoc-gen-gorm
is a plugin for protoc
, the Protocol Buffer ("proto") Compiler.
The plugin generates GORM v2 models and supporting code, depending on the options you use.
Install¶
- TODO: Point to Usage for GHA/containerized
Features¶
- Targets Gorm v2 (
gorm.io/gorm
) - Generates GORM-compatible model struct types for your message types:
UserModel
for yourUser
message - Generates methods to convert from proto message to model:
ToModel()
on the proto message, andToProto()
on the model - Generates CRUD helper methods:
Create()
,Get()
,List()
,Update()
,Patch()
, andDelete()
- Encode fields as JSON strings
Usage¶
- TODO: protoc
- TODO: buf
- TODO: GHA
About¶
- TODO: Repeat notes from README