codegen

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TemplatesDir = "templates"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AstField

type AstField struct {
	StructName  string
	FieldNumber int
	FieldName   string
	FieldType   string
	DBType      string
}

type AstStruct

type AstStruct struct {
	Package          string
	StructName       string
	AllFields        []AstField
	GofsFields       []AstField
	PkFields         []AstField
	SearchableFields []AstField
}

func GetAstStruct

func GetAstStruct(gofile, gopackage string, goline int) (*AstStruct, error)

type Template

type Template struct {
	Name      string `json:"name"`
	Tmpl      string `json:"tmpl"`
	OutputDir string `json:"output_dir"`
	Suffix    string `json:"suffix"`
}

func LoadTemplates

func LoadTemplates(gofsDir string) ([]Template, error)

Jump to

Keyboard shortcuts

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