• wangp's avatar
    lakala · 568659a9
    wangp authored
    568659a9
Name
Last commit
Last update
cert Loading commit data...
conf Loading commit data...
controller Loading commit data...
docs Loading commit data...
i18n Loading commit data...
models Loading commit data...
mysql Loading commit data...
pkg/logging Loading commit data...
repository/pay Loading commit data...
router Loading commit data...
setting Loading commit data...
.gitignore Loading commit data...
Dockerfile Loading commit data...
PROD.Dockerfile Loading commit data...
README.md Loading commit data...
dev_deploy.sh Loading commit data...
docker-compose.yaml Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...
main.go Loading commit data...
prod-docker-compose.yaml Loading commit data...
prod_deploy.sh Loading commit data...
run-dev.sh Loading commit data...
run-prod.sh Loading commit data...
sftp-config.json Loading commit data...

system_pay

谛语-谛宝医生数据分析平台

项目结构

├── conf 配置文件
├── controller   controller层
│   ├── api
│   │   └── v1
│   └── base controller共用方法
├── docs swagger
├── i18n 多语言文件
├── logs 日志
├── middleware 中间件
│   └── jwt
├── models 结构体
├── mysql
├── pkg 第三方包
│   ├── logging
│   └── sms
├── redis  redis
├── repository 数据层
├── router
│   ├── pack 路由封装
│   ├── router.go 路由入口
│   └── v1  v1版本接口
├── run-dev.sh 启动脚本
├── service 业务
├── setting 配置
├── tests 测试
└── utils 工具
├── main.go 项目入口
├── go.mod gomod
├── go.sum

关于国际化-i18n

国际化文件 base.ResponseErrorWithMsg(c, base.ServerError) ServerError为200,在i18n对应文件写 200 = "对应文字" t.SetLanguage(语言类型) 语言类型即使toml文件的文件名

关于swagger

swag init 更新swagger

关于热更新

air 启动air热更新
air -d 启动air热更新并且显示具体日志
安装air
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s
air -v