Skip to content

A Golang protobuf plugin used to generate the necessary interfaces to interact with the database

License

Notifications You must be signed in to change notification settings

Hellysonrp/protoc-gen-go-db-enum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protoc-gen-go-db-enum

This protobuf compiler plugin generates the Valuer and Scanner interfaces for enums defined in the proto files.

It is highly based of the code of protoc-gen-go. I just got the code, stripped out any unnecessary parts, and built this plugin.

Usage

Install it using the go install command:

go install github.com/Hellysonrp/protoc-gen-go-db-enum

Some usage examples:

protoc --plugin protoc-gen-go-db-enum --go-db-enum_out=output example.proto

protoc --plugin protoc-gen-go-db-enum --go-db-enum_out=paths=source_relative:output example.proto

If you have problems with protoc not finding the plugin in the PATH, I recommend passing the absolute path to the plugin:

protoc --plugin ${HOME}/go/bin/protoc-gen-go-db-enum --go-db-enum_out=output example.proto

protoc --plugin ${HOME}/go/bin/protoc-gen-go-db-enum --go-db-enum_out=paths=source_relative:output example.proto

About

A Golang protobuf plugin used to generate the necessary interfaces to interact with the database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages