modulepackage
0.0.0-20231115030731-4be2eb7c4928
Repository: https://github.com/lujingwei002/gen_server.git
Documentation: pkg.go.dev
# README
gen_server
Quick started
- Download gen_server byb using:
go install github.com/lujingwei/gen_server/bin/gen_server
功能
- 从xlsx表格生成配置
- 生成协议
- 生成model, dao
配置生成
例子
@xlsx("xxx.xlsx")
class TaskConf {
Name string;
}
源格式
列名1 | 列名2 | 列名3 | 列名4 |
---|---|---|---|
注释 | 注释 | 注释 | 注释 |
名字1 | 名字2 | 名字3 | 名字4 |
名字1 | 名字2 | 名字4 | 名字4 |
类型 | 类型 | 类型 | 类型 |
数值 | 数值 | 数值 | 数值 |
类型
类型 | 解释 | golang | lua | |
---|---|---|---|---|
bool | ||||
int8 | ||||
int16 | ||||
int32 | ||||
int64 | ||||
uint8 | ||||
uint16 | ||||
uint32 | ||||
uint64 | ||||
string | ||||
json | ||||
[]string | ||||
[]int8 | ||||
[]int16 | ||||
[]int32 | ||||
[]int64 |
export script
export("xlsx路径名", lua, converter, "目标路径")
model
loader
bundle
协议生成
例子
namespace Login {
const MessageId = 1001;
class Request {
first: string;
last?: string;
}
class Response {
ErrorCode: number
}
}
参考
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
loader加载完成后,由handler进行转换处理.
loader由gen生成.
application需要实现的接口,返回loader,和接收loader的事件回调.