plate

package
v0.0.0-...-70261f9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 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 AutoCodeStructData

type AutoCodeStructData struct {
	Package        string            `json:"package"`
	TableName      string            `json:"tableName"`   // 表名 				auto_code
	StructName     string            `json:"structName"`  // Struct名称 		AutoCode 大写驼峰命名
	ValueName      string            `json:"valueName"`   // Struct变量名 		autoCode 小写驼峰命名
	JsonName       string            `json:"jsonName"`    // StructJson名		auto_code api路径前缀
	StructComment  string            `json:"chineseName"` // Struct中文名称 	创建api的描述和注释
	Fields         []*provider.Field `json:"fields,omitempty"`
	ImportPkgPaths []string
}

AutoCodeStructData 初始版本自动化代码工具

func (*AutoCodeStructData) Reverse

func (m *AutoCodeStructData) Reverse() *AutoCodeStructData

type PlateMeta

type PlateMeta struct {
	Key          string
	AutoCodePath string //生成的代码路径  blog/api/article.go
	Replace      bool   //是否替换文件

	TemplateString string //模版文件内容
	//TemplatePath   string      //模版文件路径   tpl/api.go.tpl
	Data interface{} //填充内容
}

生成目录,文件名,模板内容,填充数据 data

func (*PlateMeta) CreateTempFile

func (tempMeta *PlateMeta) CreateTempFile() error

func (*PlateMeta) MoveTempFile

func (tempMeta *PlateMeta) MoveTempFile(movePath string) error

func (*PlateMeta) RollBack

func (tempMeta *PlateMeta) RollBack() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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