generate

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntityName added in v1.0.9

func EntityName(name string) string

EntityName 模板实体函数

func FieldType added in v1.0.9

func FieldType(s string) string

FieldType 字段属性

func GenAPI

func GenAPI(ctx context.Context, project, backend, module, comment, entity, pkColumn string) error

GenAPI 生成API

func GenAPIContent

func GenAPIContent(ctx context.Context, project, backend, module, comment, entity, pkColumn string) (*bytes.Buffer, error)

GenAPIContent 生成API内容

func GenCasbin added in v1.0.3

func GenCasbin(backend, module, entity string) error

GenCasbin 生成Casbin Migrate

func GenCasbinContent added in v1.0.3

func GenCasbinContent(entity string) (*bytes.Buffer, error)

GenCasbinContent 生成权限内容

func GenDB

func GenDB(ctx context.Context, project, backend, module, entity, table string) error

GenDB 生成DB

func GenDBContent

func GenDBContent(ctx context.Context, project, backend, module, entity, table string) (*bytes.Buffer, error)

GenDBContent 生成DB内容

func GenJS

func GenJS(ctx context.Context, frontend, entity, comment, pkColumn string) error

GenJS 生成JS

func GenJSContent

func GenJSContent(ctx context.Context, entity, comment, pkColumn string) (*bytes.Buffer, error)

GenJSContent 生成API内容

func GenMenu added in v1.0.3

func GenMenu(backend, module string, menus []model.Menu) error

GenMenu 生成Menu Migrate

func GenMenuContent added in v1.0.3

func GenMenuContent(menus []model.Menu) (*bytes.Buffer, error)

GenMenuContent 生成菜单内容

func GenModel

func GenModel(ctx context.Context, project, backend, module, comment, entity, pkColumn, table string, columns []model.Columns) error

GenModel 生成model实现文件

func GenModelContent

func GenModelContent(ctx context.Context, project, backend, module, comment, entity, pkColumn, table string, columns []model.Columns) (*bytes.Buffer, error)

GenModelContent 生成model实现文件

func GenParam

func GenParam(ctx context.Context, backend, module, entity, comment string, columns []model.Columns) error

GenParam 生成参数

func GenParamContent

func GenParamContent(ctx context.Context, entity, comment string, columns []model.Columns) (*bytes.Buffer, error)

GenParamContent 生成param实现文件

func GenRoleMenu added in v1.0.3

func GenRoleMenu(backend, module string, ids []int) error

GenRoleMenu 生成RoleMenu Migrate

func GenRoleMenuContent added in v1.0.3

func GenRoleMenuContent(ids []int) (*bytes.Buffer, error)

GenRoleMenuContent 生成菜单内容

func GenRouter

func GenRouter(ctx context.Context, project, backend, module, entity, comment, crud string) error

GenRouter 生成Router

func GenRouterContent

func GenRouterContent(ctx context.Context, project, backend, module, entity, comment, crud, tmpl string) (*bytes.Buffer, error)

GenRouterContent 生成Router内容

func GenService

func GenService(ctx context.Context, project, backend, module, comment, entity, pkColumn, crud string) error

GenService 生成service实现文件

func GenServiceContent

func GenServiceContent(ctx context.Context, project, backend, module, comment, entity, pkColumn, crud string) (*bytes.Buffer, error)

GenServiceContent 生成service实现文件内容

func GenVue

func GenVue(ctx context.Context, frontend, entity, comment, pkColumn, fileName string, columns []model.Columns) error

GenVue 生成vue

func GenVue3 added in v1.0.9

func GenVue3(ctx context.Context, frontend, entity, comment, pkColumn, fileName string, columns []model.Columns) error

GenVue3 生成vue3.0

func GenVue3Content added in v1.0.9

func GenVue3Content(ctx context.Context, frontend, entity, comment string, columns []model.Columns) (*bytes.Buffer, error)

func GenVueContent

func GenVueContent(ctx context.Context, frontend, entity, comment, fileName, pkColumn string, columns []model.Columns) (*bytes.Buffer, error)

GenVueContent 生成API内容

func ModuleName added in v1.0.9

func ModuleName(name string) string

ModuleName 模板模块函数

Types

This section is empty.

Jump to

Keyboard shortcuts

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