autocode

package module
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

autocode

一个自动生成后端代码的工具,小巧精致,功能齐全
基于gin,sqlx等工具
生成代码使用示例
  	autocode.InitDB("root", "123456", "localhost", "3306", "demo")
	b := autocode.ProBasic{ModName: "testAuto", TblName: "tbl_product", Name: "Product"}
	b.Start()
项目启动示例
	db.Init("root", "123456", "localhost", "3306", "demo")
	r := gin.Default()
	router.Register(r)
	r.Run(":8080")

注意:需要将router包下生成的router注册到,register.go 文件中,该模块方可使用

Documentation

Index

Constants

View Source
const Api = "api"
View Source
const Db = "db"
View Source
const Json = "json"
View Source
const Model = "model"
View Source
const Router = "router"
View Source
const Service = "service"
View Source
const Version = "v1.0.24"

Variables

This section is empty.

Functions

func InitDB

func InitDB(userName, password, host, port, name string)

Types

type ProBasic

type ProBasic struct {
	Name    string
	TblName string
	Path    string
	ModName string
	// contains filtered or unexported fields
}

func (*ProBasic) Start

func (p *ProBasic) Start()

func (*ProBasic) StartFunc added in v1.0.13

func (p *ProBasic) StartFunc(args ...string)

StartFunc 自定义生成参数可为 Model、APi 等

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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