Skip to content

lwc/protoc-gen-benum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Better enums

Adds helper methods to go protobuf enums that allow them to be used directly in 99designs/gqlgen and database/sql.

By default, the enum value will be used as the db & gql values, but both can be overridden via proto options e.g:

enum MyEnum {
    VALUE_1 = 0 [(benum.db)="db_value_1", (benum.gql)="gqlValue1"];
    VALUE_2 = 1 [(benum.db)="db_value_2", (benum.gql)="gqlValue2"];
    VALUE_3 = 2 [(benum.db)="db_value_3", (benum.gql)="gqlValue3"];
}

About

Protobuf enum helpers for Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published