go-srv-kit
为微服务和业务系统开发提供开箱即用的工具;
- 按需配置启动基础组件,如:数据库、缓存、消息队列等。
- 提供一些基础的工具,如:日志、配置、HTTP、GRPC、JWT、SnowflakeId等。
创建新项目请阅读: README-NEW-PROJECT.md
- 本工具的服务框架是: go-kratos
- 项目的目录结构参考: DDD(领域驱动设计)
参考链接
Windows系统,请使用cmd
或git-bash
运行。
# 启动项目
go run ./example/cmd/main/... -conf=./example/configs
# 运行测试 HTTP JSON
curl http://127.0.0.1:8081/api/v1/ping/hello
# curl http://127.0.0.1:8081/api/v1/ping/error
# curl http://127.0.0.1:8081/api/v1/ping/logger
# 运行测试 HTTP PROTOBUF
curl -X GET \
-H "Content-Type: application/proto" \
-H "Accept: application/proto" \
http://127.0.0.1:8081/api/v1/ping/hello
curl -X GET \
-H "Content-Type: application/proto" \
-H "Accept: application/proto" \
http://127.0.0.1:8081/api/v1/ping/error
感谢支持 | LOGO | 支持内容 |
---|---|---|
JETBRAINS | Open Source Development License |
如果您觉得这个项目有趣,或者对您有帮助,请给个star吧!
If you think this project is interesting, or helpful to you, please give a star!