feat: 增加接口流量配置中间件

This commit is contained in:
2026-01-04 15:28:11 +08:00
parent 3788d2b4b6
commit ded502746c
13 changed files with 215 additions and 79 deletions

View File

@@ -17,7 +17,7 @@ import (
)
// hook 执行hook逻辑
func (s *server) hook(ctx *gin.Context, uriCfg UriConfig) {
func (s *server) hook(ctx *gin.Context, uriCfg define.UriConfig) {
var (
exists bool
isSuccess any
@@ -47,7 +47,7 @@ func (s *server) hook(ctx *gin.Context, uriCfg UriConfig) {
}
}
func (s *server) hookAfter(ctx *gin.Context, uriCfg UriConfig, hookInstance *define.LogicAfterResponse, success bool) {
func (s *server) hookAfter(ctx *gin.Context, uriCfg define.UriConfig, hookInstance *define.LogicAfterResponse, success bool) {
innerContext := util.GinCtxToContext(ctx)
defer func() {
if err := recover(); err != nil {