plugin

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SUPPORTS_OPTIONAL_FIELDS = 1

I can't find where the constant is for this in protogen, so I'm putting it here.

Variables

This section is empty.

Functions

func ApplyTemplate added in v0.1.3

func ApplyTemplate(gf *protogen.GeneratedFile, f *protogen.File, opts PluginOptions) (err error)

Types

type Model added in v0.1.3

type Model struct {
	*protogen.Message
	Name      string
	TableName string
	Fields    []*ModelField
}

func (*Model) Parse added in v0.1.3

func (m *Model) Parse() (err error)

type ModelField added in v0.1.3

type ModelField struct {
	*protogen.Field
	ModelType                      string
	ModelSingularType              string
	Tag                            string
	Options                        *gorm.GormFieldOptions
	IsMessage                      bool
	IsRepeated                     bool
	IsTimestamp                    bool
	IsStructPb                     bool
	Comments                       string
	Ignore                         bool
	Name                           string
	ShouldGenerateBelongsToIdField bool
}

func (*ModelField) Parse added in v0.1.3

func (f *ModelField) Parse() (err error)

type PluginOptions added in v0.1.3

type PluginOptions struct {
	EnumsAsInts bool
}

type PreparedMessage added in v0.1.3

type PreparedMessage struct {
	*protogen.Message
	*Model
	PluginOptions
	Options *gorm.GormMessageOptions
	Ignore  bool
}

func (*PreparedMessage) Parse added in v0.1.3

func (pm *PreparedMessage) Parse() (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL