sponge is a powerful code generation tool, a microservices framework based on gin and gRPC.
Go to file
2023-03-03 21:01:22 +08:00
.github fix upgrade bug 2023-02-20 23:48:23 +08:00
api fix: cross-service trace issues 2022-12-06 23:42:31 +08:00
assets fix upgrade bug 2023-02-20 23:48:23 +08:00
build adjustment code 2022-11-21 22:12:49 +08:00
cmd generate performance crunching code 2023-03-03 21:01:22 +08:00
configs feat: add sponge document 2022-12-13 22:35:47 +08:00
deployments adjustment code 2022-12-12 23:34:00 +08:00
docs add bulk delete interface 2023-01-14 16:24:07 +08:00
internal generate performance crunching code 2023-03-03 21:01:22 +08:00
pkg optimised ui 2023-03-03 20:55:58 +08:00
scripts distinguishing protoc plug-ins 2023-03-02 00:48:14 +08:00
test feat: add sponge document 2022-12-13 22:35:47 +08:00
third_party adjustment code 2022-11-21 22:12:49 +08:00
.gitignore adjust command parameters 2022-11-14 23:51:09 +08:00
.golangci.yml feat: add rpc gateway and optimize code 2022-10-31 23:40:40 +08:00
codecov.yml fix: services registry and discovery 2022-10-21 21:29:20 +08:00
doc.go update release doc 2022-12-15 22:06:58 +08:00
go.mod add bulk delete interface 2023-01-14 16:24:07 +08:00
go.sum rename cmd foldor 2022-11-11 22:54:22 +08:00
Jenkinsfile adjustment code 2022-12-12 23:34:00 +08:00
LICENSE Initial commit 2022-09-19 23:18:08 +08:00
Makefile start service with nohup 2023-02-19 17:19:47 +08:00
README.md update docs 2023-02-19 17:21:53 +08:00

sponge 中文

Go Report codecov Go Reference Go License: MIT Join the chat at https://gitter.im/zhufuyi/sponge

sponge is a microservice framework and a tool for quickly creating web and microservice code. sponge has a rich set of generated code commands, generating a total of 12 different functional codes that can be combined into complete services (similar to a sponge that has been artificially broken up cells can be automatically reassembled into a new sponge). Microservice code functions include logging, service registration and discovery, registry, flow limiting, fusing, link tracking, metrics monitoring, pprof performance analysis, statistics, caching, CICD and more. The code is decoupled and modular in design, with commonly used code and scripts generated automatically, requiring only business logic code to be written according to the generated templates. The web and rpc services created include complete engineering code and scripts from development to deployment, making development in the go language easier and more efficient.


sponge generates the code framework

The generated code is based on three approaches Yaml, SQL DDL and Protobuf, each possessing different functional code generation, and the framework diagram of the generated code is shown in Figure 1-1.

Figure 1-1 sponge generation code framework diagram


Microservices framework

The microservice code framework created by sponge is shown in Figure 1-2, this is a typical microservice hierarchy with high performance, high scalability, and includes common service governance features.

Figure 1-2 Microservices framework diagram


Online code generation demo

Online code generation demo: https://go-sponge.com/ui

💡 Warning.

Some of the generated code requires mysql account and password, do not try here to avoid the risk of being exposed. Server resources are limited and may not be available later, it is recommended to build the same generation code platform locally to use.


Installation

(1) install sponge

go install github.com/zhufuyi/sponge/cmd/sponge@latest

(2) install dependency plugins and tools

sponge init

If there is a dependency tool installation error(except protoc), execute the command to retry sponge tools --install


(3) install protoc

Download it from https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3 and add the directory where the protoc file is located under system path.


💡 NOTICE:

If you are using windows environment, you need to install some additional dependency tools, see windows dependency tools for installation steps.


Quick start

Once you have installed sponge and the dependencies, you are ready to go, start the ui service from the command line:

sponge run

Visit http://localhost:24631 in your browser, 12 types of codes can be generated.

💡 NOTICE:

Do not execute the sponge run in the directory where the sponge file is located.


Documentation

sponge usage documentation


If it's useful to you, give it a star .


License

See the LICENSE file for licensing information.