autogql

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstraintFieldHook

func ConstraintFieldHook(ggs *AutoGqlPlugin) func(td *ast.Definition, fd *ast.FieldDefinition, f *modelgen.Field) (*modelgen.Field, error)

func MutateHook

func MutateHook(ggs *AutoGqlPlugin) func(b *modelgen.ModelBuild) *modelgen.ModelBuild

Types

type AutoGqlPlugin

type AutoGqlPlugin struct {
	Handler structure.SqlBuilderHelper
}

func NewAutoGqlPlugin

func NewAutoGqlPlugin() (*AutoGqlPlugin, *modelgen.Plugin)

func (*AutoGqlPlugin) GenerateCode

func (ggs *AutoGqlPlugin) GenerateCode(data *codegen.Data) error

func (*AutoGqlPlugin) InjectSourceEarly

func (ggs *AutoGqlPlugin) InjectSourceEarly() *ast.Source

func (*AutoGqlPlugin) InjectSourceLate

func (ggs *AutoGqlPlugin) InjectSourceLate(schema *ast.Schema) *ast.Source

func (*AutoGqlPlugin) MutateConfig

func (ggs *AutoGqlPlugin) MutateConfig(cfg *config.Config) error

func (*AutoGqlPlugin) Name

func (ggs *AutoGqlPlugin) Name() string

type GenerateData

type GenerateData struct {
	Data    *codegen.Data
	Handler structure.SqlBuilderHelper
}

func (*GenerateData) GenPointerStrIfNeeded

func (db *GenerateData) GenPointerStrIfNeeded(typeName string, v structure.Entity, revert bool) string

func (*GenerateData) GeneratedPackage

func (db *GenerateData) GeneratedPackage() string

func (*GenerateData) GetGoFieldName

func (db *GenerateData) GetGoFieldName(typeName string, v structure.Entity) string

func (*GenerateData) GetGoFieldType

func (db *GenerateData) GetGoFieldType(typeName string, v structure.Entity, rootType bool) string

func (*GenerateData) GetGoFieldTypeName

func (db *GenerateData) GetGoFieldTypeName(typeName string, v structure.Entity) string

func (*GenerateData) GetPackage

func (db *GenerateData) GetPackage(v structure.Object) string

func (*GenerateData) GetPointerSymbol

func (db *GenerateData) GetPointerSymbol(entity structure.Entity) string

func (*GenerateData) GetValueOfInput

func (db *GenerateData) GetValueOfInput(objectname string, builder structure.Object, v structure.Entity) string

func (*GenerateData) HookList

func (db *GenerateData) HookList(suffix, prefix string) []string

func (*GenerateData) Imports

func (db *GenerateData) Imports() []string

func (*GenerateData) ModelsMigrations

func (db *GenerateData) ModelsMigrations() string

func (*GenerateData) PointerStrIfNeeded

func (db *GenerateData) PointerStrIfNeeded(typeName string, v structure.Entity, revert bool) string

func (*GenerateData) PrimaryKeyEntityOfObject

func (db *GenerateData) PrimaryKeyEntityOfObject(o string) *structure.Entity

func (*GenerateData) PrimaryKeyOfObject

func (db *GenerateData) PrimaryKeyOfObject(o string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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