You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
文武
91c95ef105
|
4 months ago | |
---|---|---|
api | 6 months ago | |
cmd/server | 6 months ago | |
configs | 4 months ago | |
internal | 6 months ago | |
third_party | 6 months ago | |
.drone.yml | 6 months ago | |
.gitignore | 6 months ago | |
Dockerfile | 6 months ago | |
Makefile | 6 months ago | |
README.md | 6 months ago | |
go.mod | 6 months ago | |
go.sum | 6 months ago | |
openapi.yaml | 6 months ago |
README.md
sevice-layout
微服务项目布局模板,本项目基于B站开源Kratos框架结合风芒自身基础组件封装,可以作为统一的微服务kit库,适合通用微服务项目
参考文档地址
错误规范
{
// 错误码,跟 http-status 一致,并且在 grpc 中可以转换成 grpc-status
"code": 500,
// 错误原因,定义为业务判定错误码
"reason": "USER_NOT_FOUND",
// 错误信息,为用户可读的信息,可作为用户提示内容
"message": "invalid argument error",
// 错误元信息,为错误添加附加可扩展信息
"metadata": {
"foo": "bar"
}
}
参考 https://go-kratos.dev/docs/component/errors
组件
存储
Gorm/Redis
服务注册发现
Nacos
配置中心
Nacos
日志
Zap
协议
gRPC/HTTP