Skip to content

About

Protobuf enum helpers for Go

Resources

Stars

7 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages