Documentation ¶
Index ¶
- func ConstraintFieldHook(ggs *AutoGqlPlugin) ...
- func MutateHook(ggs *AutoGqlPlugin) func(b *modelgen.ModelBuild) *modelgen.ModelBuild
- type AutoGqlPlugin
- func (ggs *AutoGqlPlugin) GenerateCode(data *codegen.Data) error
- func (ggs *AutoGqlPlugin) InjectSourceEarly() *ast.Source
- func (ggs *AutoGqlPlugin) InjectSourceLate(schema *ast.Schema) *ast.Source
- func (ggs *AutoGqlPlugin) MutateConfig(cfg *config.Config) error
- func (ggs *AutoGqlPlugin) Name() string
- type ForeignNameResult
- type GenerateData
- func (db *GenerateData) ForeignName(object structure.Object, entity structure.Entity) ForeignNameResult
- func (db *GenerateData) GenPointerStrIfNeeded(typeName string, v structure.Entity, revert bool) string
- func (db *GenerateData) GeneratedPackage() string
- func (db *GenerateData) GetGoField(typeName string, v structure.Entity) *codegen.Field
- func (db *GenerateData) GetGoFieldName(typeName string, v structure.Entity) string
- func (db *GenerateData) GetGoFieldType(typeName string, v structure.Entity, rootType bool) string
- func (db *GenerateData) GetGoFieldTypeName(typeName string, v structure.Entity) string
- func (db *GenerateData) GetMaxMatchGoFieldType(objectname string, entities []structure.Entity) string
- func (db *GenerateData) GetPackage(v structure.Object) string
- func (db *GenerateData) GetPointerSymbol(typeName string, entity structure.Entity) string
- func (db *GenerateData) GetValueOfInput(objectname string, builder structure.Object, v structure.Entity) string
- func (db *GenerateData) HookList(suffix, prefix string) []string
- func (db *GenerateData) HookListMany2Many(suffix string) []string
- func (db *GenerateData) Imports() []string
- func (db *GenerateData) ModelsMigrations() string
- func (db *GenerateData) PointerStrIfNeeded(typeName string, v structure.Entity, revert bool) string
- func (db *GenerateData) PrimaryKeyEntityOfObject(o string) *structure.Entity
- func (db *GenerateData) PrimaryKeyOfObject(o string) string
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 ForeignNameResult ¶ added in v0.1.0
type GenerateData ¶
type GenerateData struct { Data *codegen.Data Handler structure.SqlBuilderHelper }
func (*GenerateData) ForeignName ¶ added in v0.0.22
func (db *GenerateData) ForeignName(object structure.Object, entity structure.Entity) ForeignNameResult
func (*GenerateData) GenPointerStrIfNeeded ¶
func (*GenerateData) GeneratedPackage ¶
func (db *GenerateData) GeneratedPackage() string
func (*GenerateData) GetGoField ¶ added in v0.1.5
func (*GenerateData) GetGoFieldName ¶
func (db *GenerateData) GetGoFieldName(typeName string, v structure.Entity) string
func (*GenerateData) GetGoFieldType ¶
func (*GenerateData) GetGoFieldTypeName ¶
func (db *GenerateData) GetGoFieldTypeName(typeName string, v structure.Entity) string
func (*GenerateData) GetMaxMatchGoFieldType ¶ added in v0.0.21
func (db *GenerateData) GetMaxMatchGoFieldType(objectname string, entities []structure.Entity) string
func (*GenerateData) GetPackage ¶
func (db *GenerateData) GetPackage(v structure.Object) string
func (*GenerateData) GetPointerSymbol ¶
func (db *GenerateData) GetPointerSymbol(typeName string, entity structure.Entity) string
func (*GenerateData) GetValueOfInput ¶
func (*GenerateData) HookList ¶
func (db *GenerateData) HookList(suffix, prefix string) []string
func (*GenerateData) HookListMany2Many ¶ added in v0.0.27
func (db *GenerateData) HookListMany2Many(suffix string) []string
func (*GenerateData) Imports ¶
func (db *GenerateData) Imports() []string
func (*GenerateData) ModelsMigrations ¶
func (db *GenerateData) ModelsMigrations() string
func (*GenerateData) PointerStrIfNeeded ¶
func (*GenerateData) PrimaryKeyEntityOfObject ¶
func (db *GenerateData) PrimaryKeyEntityOfObject(o string) *structure.Entity
func (*GenerateData) PrimaryKeyOfObject ¶
func (db *GenerateData) PrimaryKeyOfObject(o string) string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.