feat: 增加接口流量配置中间件
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user