Skip to content

Commit 949cf3b

Browse files
committed
adjustment code
1 parent da2c177 commit 949cf3b

File tree

13 files changed

+24
-57
lines changed

13 files changed

+24
-57
lines changed

.github/RELEASE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Change log
22

3-
- The make proto command supports code generation for a given proto file.
43
- Gorm supports master-slave configuration and custom plugins.
5-
- Logger library add sync function.
4+
- The make proto command supports code generation for a given proto file.
5+
- Jwt authentication support for custom fields and checksum functions.
6+
- Adding the rabbitmq library.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## sponge [中文](assets/readme-cn.md)
1+
## English | [简体中文](assets/readme-cn.md)
22

33
<p align="center">
44
<img width="500px" src="https://raw.githubusercontent.com/zhufuyi/sponge/main/assets/logo.png">
@@ -58,7 +58,7 @@ Egg model profiling diagram for `⓷Web services created based on protobuf`:
5858
<img width="1200px" src="https://raw.githubusercontent.com/zhufuyi/sponge_examples/main/assets/en_web-http-pb-anatomy.png">
5959
</p>
6060

61-
This is the egg model for web service code, and there are egg models for microservice (gRPC) code, and rpc gateway service code described in [sponge documentation](https://go-sponge.com/).
61+
This is the egg model for web service code, and there are egg models for microservice (gRPC) code, and rpc gateway service code described in [sponge documentation](https://go-sponge.com/learn-about-sponge?id=%f0%9f%8f%b7project-code-egg-model).
6262

6363
<br>
6464

api/serverNameExample/v1/userExample.pb.go

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/readme-cn.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ sponge生成代码过程中剥离了业务逻辑与非业务逻辑两大部分
4242
<img width="1200px" src="https://raw.githubusercontent.com/zhufuyi/sponge_examples/main/assets/web-http-pb-anatomy.png">
4343
</p>
4444

45-
这是web服务代码鸡蛋模型,还有微服务(gRPC)代码、rpc网关服务代码的鸡蛋模型在[sponge文档](https://go-sponge.com/zh-cn/)中有介绍。
45+
这是web服务代码鸡蛋模型,还有微服务(gRPC)代码、rpc网关服务代码的鸡蛋模型在[sponge文档](https://go-sponge.com/zh-cn/learn-about-sponge?id=%f0%9f%8f%b7%e9%a1%b9%e7%9b%ae%e4%bb%a3%e7%a0%81%e9%b8%a1%e8%9b%8b%e6%a8%a1%e5%9e%8b)中有介绍。
4646

4747
<br>
4848

@@ -60,6 +60,7 @@ sponge包含丰富的组件(按需使用):
6060
- 自动化api接口文档 [swagger](https://github.com/swaggo/swag), [protoc-gen-openapiv2](https://github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2)
6161
- 鉴权 [jwt](https://github.com/golang-jwt/jwt)
6262
- 校验 [validator](https://github.com/go-playground/validator)
63+
- 消息组件 [rabbitmq](github.com/rabbitmq/amqp091-go)
6364
- 自适应限流 [ratelimit](https://github.com/zhufuyi/sponge/tree/main/pkg/shield/ratelimit)
6465
- 自适应熔断 [circuitbreaker](https://github.com/zhufuyi/sponge/tree/main/pkg/shield/circuitbreaker)
6566
- 链路跟踪 [opentelemetry](https://github.com/open-telemetry/opentelemetry-go)

cmd/serverNameExample_grpcExample/initial/registerClose.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/zhufuyi/sponge/internal/model"
99

1010
"github.com/zhufuyi/sponge/pkg/app"
11-
"github.com/zhufuyi/sponge/pkg/logger"
1211
"github.com/zhufuyi/sponge/pkg/tracer"
1312
)
1413

@@ -41,10 +40,5 @@ func RegisterClose(servers []app.IServer) []app.Close {
4140
})
4241
}
4342

44-
// logger flushing
45-
closes = append(closes, func() error {
46-
return logger.Sync()
47-
})
48-
4943
return closes
5044
}

cmd/serverNameExample_grpcGwPbExample/initial/registerClose.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
//"github.com/zhufuyi/sponge/internal/rpcclient"
99

1010
"github.com/zhufuyi/sponge/pkg/app"
11-
"github.com/zhufuyi/sponge/pkg/logger"
1211
"github.com/zhufuyi/sponge/pkg/tracer"
1312
)
1413

@@ -35,10 +34,5 @@ func RegisterClose(servers []app.IServer) []app.Close {
3534
})
3635
}
3736

38-
// logger flushing
39-
closes = append(closes, func() error {
40-
return logger.Sync()
41-
})
42-
4337
return closes
4438
}

cmd/serverNameExample_grpcPbExample/initial/registerClose.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
//"github.com/zhufuyi/sponge/internal/model"
99

1010
"github.com/zhufuyi/sponge/pkg/app"
11-
"github.com/zhufuyi/sponge/pkg/logger"
1211
"github.com/zhufuyi/sponge/pkg/tracer"
1312
)
1413

@@ -41,10 +40,5 @@ func RegisterClose(servers []app.IServer) []app.Close {
4140
})
4241
}
4342

44-
// logger flushing
45-
closes = append(closes, func() error {
46-
return logger.Sync()
47-
})
48-
4943
return closes
5044
}

cmd/serverNameExample_httpExample/initial/registerClose.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/zhufuyi/sponge/internal/model"
99

1010
"github.com/zhufuyi/sponge/pkg/app"
11-
"github.com/zhufuyi/sponge/pkg/logger"
1211
"github.com/zhufuyi/sponge/pkg/tracer"
1312
)
1413

@@ -41,10 +40,5 @@ func RegisterClose(servers []app.IServer) []app.Close {
4140
})
4241
}
4342

44-
// logger flushing
45-
closes = append(closes, func() error {
46-
return logger.Sync()
47-
})
48-
4943
return closes
5044
}

cmd/serverNameExample_httpPbExample/initial/registerClose.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
//"github.com/zhufuyi/sponge/internal/model"
99

1010
"github.com/zhufuyi/sponge/pkg/app"
11-
"github.com/zhufuyi/sponge/pkg/logger"
1211
"github.com/zhufuyi/sponge/pkg/tracer"
1312
)
1413

@@ -41,10 +40,5 @@ func RegisterClose(servers []app.IServer) []app.Close {
4140
})
4241
}
4342

44-
// logger flushing
45-
closes = append(closes, func() error {
46-
return logger.Sync()
47-
})
48-
4943
return closes
5044
}

cmd/serverNameExample_mixExample/initial/registerClose.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"github.com/zhufuyi/sponge/internal/model"
99

1010
"github.com/zhufuyi/sponge/pkg/app"
11-
"github.com/zhufuyi/sponge/pkg/logger"
1211
"github.com/zhufuyi/sponge/pkg/tracer"
1312
)
1413

@@ -41,10 +40,5 @@ func RegisterClose(servers []app.IServer) []app.Close {
4140
})
4241
}
4342

44-
// logger flushing
45-
closes = append(closes, func() error {
46-
return logger.Sync()
47-
})
48-
4943
return closes
5044
}

0 commit comments

Comments
 (0)