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.
文武 c76c7d56be test 6 months ago
api init 6 months ago
cmd/server init 6 months ago
configs init 6 months ago
internal init 6 months ago
third_party init 6 months ago
.drone.yml test 6 months ago
.gitignore init 6 months ago
Dockerfile test 6 months ago
Makefile init 6 months ago
README.md init 6 months ago
go.mod init 6 months ago
go.sum init 6 months ago
openapi.yaml init 6 months ago

README.md

sevice-layout

微服务项目布局模板,本项目基于B站开源Kratos框架结合风芒自身基础组件封装,可以作为统一的微服务kit库,适合通用微服务项目

参考文档地址

https://go-kratos.dev/docs/

错误规范

{
    // 错误码,跟 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