handlers

package
v0.1.1-beta Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnTableHandler

func ColumnTableHandler(name string) string

ColumnTableHandler 行处理器

func FileHandler

func FileHandler(t TmplStruct, packageName string, tpl *template.Template)

func MysqlHandle

func MysqlHandle(f *model.FlagModel)

MysqlHandle mysql处理器

func ParseTemplateHandler

func ParseTemplateHandler(t TmplStructList, flagModel model.FlagModel) int

Types

type TmplColStruct

type TmplColStruct struct {
	Column     string // 字段名
	ColumnType string // 字段类型
	Tag        string // 字段的tag
}

type TmplColStructList

type TmplColStructList = []*TmplColStruct

func ColHandler

ColHandler 列处理器

type TmplStruct

type TmplStruct struct {
	Package    string            // 包名称
	StructName string            // 结构体名称
	TableName  string            // 表名称
	HasTime    bool              // 是否包含time类型的字段
	Cols       TmplColStructList // 属性
	Remark     string            // 备注
}

type TmplStructList

type TmplStructList = []*TmplStruct

func Combination

func Combination(tables model.TableMataDataList, flagModel model.FlagModel) TmplStructList

Combination 组合方法

Jump to

Keyboard shortcuts

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