gomono-layout -基于kratos+iam+整洁架构的企业级go微服务脚手架
基于大仓模式的微服务框架,集成常用组件和规范化、自动化代码生成。支持直接部署及容器化k8s部署
功能特性
本项目用到了Go企业开发的大部分核心技能点,见下图:

更多请参考:shiqinfeng1/gocollect
软件架构

架构解析见:gomono-layout 架构 & 能力说明
快速开始
依赖检查
-
服务器能访问外网
-
操作系统:CentOS Linux 8.x (64-bit) / ubuntu Linux 22.04 (64-bit)
快速部署
快速部署请参考:gomono-layout 部署指南
gomono-layout 项目还提供了更详细的部署文档,请参考:手把手教你部署gomono-layout系统
克隆当前模版
-
安装kratos工具
go install github.com/shiqinfeng1/gomono-layout/cmd/gomonoctl@latest
-
基于当前模版创建一个项目仓库
创建项目名称为helloworld,服务名称为user的项目:
$kratos new helloworld -s user
如果项目目录helloworld已经存在,将只创建服务user
添加一个新的服务:
$kratos new helloworld -s order
构建
如果你需要重新编译gomono-layout项目,可以执行以下 2 步:
-
克隆源码
$git clone https://github.com/shiqinfeng1/gomono-layout
-
编译
$cd $GOPATH/src/github.com/shiqinfeng1/gomono-layout
$make
构建后的二进制文件保存在 _output/platforms/linux/amd64/ 目录下。
使用指南
Documentation
如何贡献
欢迎贡献代码,贡献流程可以参考 developer's documentation。
社区
You are encouraged to communicate most things via GitHub issues or pull requests.
关于作者
谁在用
许可证
gomono-layout is licensed under the MIT. See LICENSE for the full license text.