Documentation ¶
Index ¶
- Variables
- func CreateDir(req GenReq)
- func GenHandler(req GenReq)
- func GenInitlialize(req GenReq)
- func GenModel(req GenReq)
- func GenProto(req GenReq)
- func GenRepository(req GenReq)
- func GenService(req GenReq)
- func GenT(req GenReq)
- func GenWeb(req GenReq)
- func GetJsonTagFromCase(str, caseStr string) string
- func InitDB(host, port, user, password, db string)
- func Run(host, user, password, port, db, table, serverName, protoName string)
- type GenReq
- type TableColumn
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DB *gorm.DB
)
Functions ¶
func GenHandler ¶
func GenHandler(req GenReq)
func GenInitlialize ¶
func GenInitlialize(req GenReq)
func GenRepository ¶
func GenRepository(req GenReq)
func GenService ¶
func GenService(req GenReq)
//////////////////////////////////////////////////////////////////////////////
func GetJsonTagFromCase ¶
Types ¶
type GenReq ¶
type TableColumn ¶
type TableColumn struct { Field string `gorm:"column:Field"` // 字段名称 Type string `gorm:"column:Type"` // 字段类型 Null string `gorm:"column:Null"` // 是否空 Key string `gorm:"column:Key"` // 索引 Default string `gorm:"column:Default"` // 默认值 Extra string `gorm:"column:Extra"` // 扩展 Comment string `gorm:"column:Comment"` // 备注 }
func GetTableCol ¶
func GetTableCol(table string) []TableColumn
Source Files ¶
- gen.go
- gen_domain.go
- gen_domain_model_base_template.go
- gen_domain_model_common_template.go
- gen_domain_repository_template.go
- gen_domain_service_template.go
- gen_handler.go
- gen_handler_template.go
- gen_initialize.go
- gen_proto.go
- gen_proto_common_template.go
- gen_proto_srv_template.go
- gen_t.go
- gen_t_template.go
- gen_web.go
- go_web_api_template.go
- model.go
- table_column.go
Click to show internal directories.
Click to hide internal directories.