gorm

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModelGeneratorData

type ModelGeneratorData struct {
	PackageName string
	Models      map[string]*ast.Definition
}

type Project

type Project struct {
	*basic.Project
}

Project is a default project configuration

func NewProject

func NewProject(option ...ProjectOption) *Project

func (*Project) ConstraintFieldHook

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

func (*Project) ModelMutationHook added in v0.0.2

func (p *Project) ModelMutationHook(b *modelgen.ModelBuild) *modelgen.ModelBuild

func (*Project) PrepareTemplateData

func (p *Project) PrepareTemplateData() *TemplateData

func (*Project) SchemaHook

func (p *Project) SchemaHook(schema *ast.Schema) error

type ProjectOption

type ProjectOption = func(project *Project) error

func WithBasicProjectOption

func WithBasicProjectOption(option basic.ProjectOption) ProjectOption

type TemplateData

type TemplateData struct {
	*basic.TemplateData
	Resources map[string]string
}

Jump to

Keyboard shortcuts

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