plugin

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 13 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) (err error)

Types

type Model added in v0.1.3

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

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
	IsJsonb                        bool
	IsOptional                     bool
	Comments                       string
	Ignore                         bool
	Name                           string
	ShouldGenerateBelongsToIdField bool
	HasReplaceRelationships        bool // any relationships except belongs to needs replace calls
	TimeFormat                     string
}

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
	Engine      string
}

type PreparedMessage added in v0.1.3

type PreparedMessage struct {
	*protogen.Message
	*Model
	PluginOptions
	Options                 *gorm.GormMessageOptions
	Ignore                  bool
	Engine                  string
	HasReplaceRelationships 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