plugin

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENGINE_UNSET = iota
	ENGINE_POSTGRES
)

DB Engine Enum

Variables

This section is empty.

Functions

This section is empty.

Types

type Field added in v0.5.0

type Field struct {
	ParentGoType string
	Type         string
	Package      string
	*gorm.GormFieldOptions
	ParentOriginName string
}

type OrmPlugin

type OrmPlugin struct {
	// *generator.Generator
	*pgs.ModuleBase

	EmptyFiles []string
	// contains filtered or unexported fields
}

OrmPlugin implements the plugin interface and creates GORM code from .protos

func (*OrmPlugin) Execute added in v0.21.0

func (p *OrmPlugin) Execute(targets map[string]pgs.File, pkgs map[string]pgs.Package) []pgs.Artifact

func (*OrmPlugin) InitContext added in v0.21.0

func (p *OrmPlugin) InitContext(c pgs.BuildContext)

Init is called once after data structures are built but before code generation begins.

func (*OrmPlugin) IsAbleToMakePQArray added in v0.21.0

func (p *OrmPlugin) IsAbleToMakePQArray(fieldType string) bool

IsAbleToMakePQArray tells us if the specific field-type can automatically be turned into a PQ array:

func (*OrmPlugin) Name

func (p *OrmPlugin) Name() string

Name identifies the plugin

func (*OrmPlugin) P added in v0.21.0

func (p *OrmPlugin) P(parts ...string)

func (*OrmPlugin) TypeName added in v0.21.0

func (p *OrmPlugin) TypeName(msg pgs.Message) string

type OrmableType added in v0.5.0

type OrmableType struct {
	OriginName string
	Name       string
	// Package     string
	File        pgs.File
	Fields      map[string]*Field
	FieldsOrder []string
}

func NewOrmableType added in v0.5.0

func NewOrmableType(oname string, file pgs.File) *OrmableType

Jump to

Keyboard shortcuts

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