update docs

This commit is contained in:
zhuyasen 2023-05-17 22:45:04 +08:00
parent 91c16a68f7
commit 33dfd1afa1
4 changed files with 39 additions and 15 deletions

4
.github/RELEASE.md vendored
View File

@ -1,5 +1,5 @@
## New
- Add 6 examples of use.
- Optimize the UI interface of sponge.
- Add a generate cache code command and UI interface.
- Add a real project microservice cluster example.
- Update documentation.

View File

@ -177,7 +177,7 @@ clean:
@rm -vrf main.go serverNameExample_mixExample.gv
@rm -vrf internal/ecode/*go.gen.*
@rm -vrf internal/routers/*go.gen.*
@rm -vrf internal/handller/*go.gen.*
@rm -vrf internal/handler/*go.gen.*
@rm -vrf internal/service/*go.gen.*
@rm -rf serverNameExample-binary.tar.gz
@echo "clean finished"

View File

@ -15,7 +15,7 @@
</div>
[sponge](https://github.com/zhufuyi/sponge) is a powerful tool for generating code for web and microservice projects, and a microservice framework based on gin and grpc packaging. sponge has a rich set of code generation commands, generating a total of 12 different functional codes that can be These can be combined into a complete service (similar to a sponge cell that can be automatically reassembled into a new sponge). Microservice code features include logging, service registration and discovery, registry, flow limiting, fusing, link tracking, metrics monitoring, pprof performance analysis, statistics, caching, CICD and more. The code decoupled modular design makes it easy to build complete project code from development to deployment, making it more convenient, easy and efficient to develop projects using the go language.
[sponge](https://github.com/zhufuyi/sponge) is a powerful tool for generating web and microservice code, as well as a microservice framework based on gin and grpc encapsulation. Sponge has a wealth of code generation commands, and different functional codes can be combined to form a complete service (similar to artificially scattered sponge cells that can automatically recombine into a new sponge). Microservice code functions include logging, service registration and discovery, registration center, flow control, fuse, link tracking, metric monitoring, pprof performance analysis, statistics, cache, CICD and other functions. The code is decoupled and modularly designed, making it easy to build complete engineering code from development to deployment, making it more convenient, easy and efficient to develop with Go language.
<br>
@ -41,11 +41,23 @@ The microservice code framework created by sponge is shown in Figure 1-2, this i
<br>
### Online code generation demo
### Supported code types for generation
Online code generation demo: [https://go-sponge.com/ui](https://go-sponge.com/ui)
- Generate complete web service code based on MySQL tables.
- Generate handler code based on MySQL tables, including CRUD code.
- Generate dao code based on MySQL tables, including CRUD code.
- Generate model code based on MySQL tables.
- Generate complete rpc service code based on MySQL tables.
- Generate service code based on MySQL tables, including CRUD code.
- Generate protobuf code based on MySQL tables.
- Generate web service code based on protobuf.
- Generate rpc service code based on protobuf.
- Generate rpc gateway service code based on protobuf.
- Generate corresponding go structure code based on yaml.
- Generate rpc connection code according to parameters.
- Generate cache code according to parameters.
💡 It is recommended to install sponge locally.
The generated code can be combined into actual project web or microservice code, and the developer only needs to focus on writing the business logic code, online UI interface demo: [https://go-sponge.com/ui](https://go-sponge.com/ui)
<br>
@ -64,7 +76,7 @@ After installing the sponge, start the UI service:
sponge run
```
Visit `http://localhost:24631` in your browser, 12 types of codes can be generated.
Visit `http://localhost:24631` in your browser, generate code by manipulating it on the page.
<br>
@ -90,7 +102,7 @@ make run
<br>
### examples
### Examples of use
- [Generate the complete web service project code](https://github.com/zhufuyi/sponge/tree/main/examples/1_web-gin-CRUD)
- [Generate generic web service project code](https://github.com/zhufuyi/sponge/tree/main/examples/2_web-gin-protobuf)

View File

@ -1,4 +1,4 @@
[sponge](https://github.com/zhufuyi/sponge) 是一个快速创建web和微服务代码工具也是一个基于gin和grpc封装的微服务框架。sponge拥有丰富的生成代码命令一共生成12种不同功能代码这些功能代码可以组合成完整的服务(类似人为打散的海绵细胞可以自动重组成一个新的海绵)。微服务代码功能包括日志、服务注册与发现、注册中心、限流、熔断、链路跟踪、指标监控、pprof性能分析、统计、缓存、CICD等功能。代码解耦模块化设计很容易构建出从开发到部署的完整工程代码让使用go语言开发更便捷、轻松、高效。
[sponge](https://github.com/zhufuyi/sponge) 是一个强大的生成web和微服务代码工具也是一个基于gin和grpc封装的微服务框架。sponge拥有丰富的生成代码命令生成不同的功能代码可以组合成完整的服务(类似人为打散的海绵细胞可以自动重组成一个新的海绵)。微服务代码功能包括日志、服务注册与发现、注册中心、限流、熔断、链路跟踪、指标监控、pprof性能分析、统计、缓存、CICD等功能。代码解耦模块化设计很容易构建出从开发到部署的完整工程代码让使用go语言开发更便捷、轻松、高效。
<br>
@ -22,11 +22,23 @@ sponge创建的微服务代码框架如下图所示这是典型的微服务
<br>
### 在线生成代码demo
### 支持生成的代码类型
在线生成代码demo [https://go-sponge.com/ui](https://go-sponge.com/ui)
- 基于mysql表生成完整的web服务代码。
- 基于mysql表生成handler代码包括CRUD代码。
- 基于mysql表生成dao代码包括CRUD代码。
- 基于mysql表生成model代码。
- 基于mysql表生成完整的rpc服务代码。
- 基于mysql表生成service代码包括CRUD代码。
- 基于mysql表生成protobuf代码。
- 基于protobuf生成web服务代码。
- 基于protobuf生成rpc服务代码。
- 基于protobuf生成rpc网关服务代码。
- 基于yaml生成对应的go结构体代码。
- 根据参数生成rpc连接代码。
- 根据参数生成cache代码。
💡 建议在本地安装sponge来使用。
生成的这些代码可以组合成实际项目的web或微服务代码开发者只需专注写业务逻辑代码在线UI界面demo [https://go-sponge.com/ui](https://go-sponge.com/ui)
<br>
@ -45,7 +57,7 @@ sponge创建的微服务代码框架如下图所示这是典型的微服务
sponge run
```
在浏览器访问 `http://localhost:24631`,在页面上可以生成12种不同功能代码。
在浏览器访问 `http://localhost:24631`,在页面上操作生成代码。
<br>
@ -77,7 +89,7 @@ make run
<br>
### 示例
### 使用示例
- [生成完整的web服务项目代码](https://www.bilibili.com/read/cv23018269)
- [生成通用的web服务项目代码](https://www.bilibili.com/read/cv23040234)