plugin

package
v0.0.0-...-71670dd Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENGINE_UNSET = iota
	ENGINE_POSTGRES
)

DB Engine Enum

Variables

View Source
var (
	ErrNotOrmable = errors.New("type is not ormable")
)

Functions

This section is empty.

Types

type Field

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

type ORMBuilder

type ORMBuilder struct {
	// contains filtered or unexported fields
}

func New

func (*ORMBuilder) Generate

func (b *ORMBuilder) Generate() (*pluginpb.CodeGeneratorResponse, error)

func (*ORMBuilder) IsAbleToMakePQArray

func (b *ORMBuilder) IsAbleToMakePQArray(fieldType string) bool

type OrmableType

type OrmableType struct {
	File       *protogen.File
	Fields     map[string]*Field
	Methods    []*autogenMethod
	Name       string
	OriginName string
	Package    string
}

func GetOrmable

func GetOrmable(ormableTypes map[string]*OrmableType, typeName string) (*OrmableType, error)

func NewOrmableType

func NewOrmableType(originalName string, pkg string, file *protogen.File) *OrmableType

Jump to

Keyboard shortcuts

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