Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrmPlugin ¶
type OrmPlugin struct { *protogen.Plugin SuppressWarnings bool StringEnums bool Gateway bool EmptyFiles []string // contains filtered or unexported fields }
OrmPlugin implements the plugin interface and creates GORM code from .protos
func (*OrmPlugin) Generate ¶
func (p *OrmPlugin) Generate()
Generate produces the code generated by the plugin for this file, except for the imports, by calling the generator's methods P, In, and Out.
func (*OrmPlugin) Init ¶
Init is called once after data structures are built but before code generation begins.
func (*OrmPlugin) IsAbleToMakePQArray ¶ added in v1.0.6
IsAbleToMakePQArray tells us if the specific field-type can automatically be turned into a PQ array:
type OrmableLookup ¶ added in v1.0.6
type OrmableLookup map[string]*OrmableType
OrmableLookup is a helper map for tracking associations and relations between models.
func (*OrmableLookup) GetOrmableByMessage ¶ added in v1.0.6
func (o *OrmableLookup) GetOrmableByMessage(message *protogen.Message) *OrmableType
GetOrmableByMessage returns the registered ormable object given the message's typename param exists.
func (*OrmableLookup) GetOrmableByType ¶ added in v1.0.6
func (o *OrmableLookup) GetOrmableByType(typeName string) *OrmableType
GetOrmableByType returns the registered ormable object given the typename param exists.
func (*OrmableLookup) TypeOk ¶ added in v1.0.6
func (o *OrmableLookup) TypeOk(t string) bool
TypeOk returns true if the parameter type is registered as ormable.