feat: 优化注册方法检测

This commit is contained in:
2025-12-26 17:22:37 +08:00
parent 29201ac796
commit e415bad869
7 changed files with 65 additions and 51 deletions

View File

@@ -20,10 +20,6 @@ var (
)
// HttpHandleConfig 请求处理配置
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 20:41 2022/6/25
type HttpHandleConfig struct {
RecordRequestDataField string
RecordResponseDataField string
@@ -43,19 +39,11 @@ type HttpHandleConfig struct {
}
// ConvertDefaultConfig 覆盖默认配置
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 20:41 2022/6/25
func ConvertDefaultConfig(cfg *HttpHandleConfig) {
inputHttpHandleConfig = cfg
}
// GetHttpHandleConfig 获取http配置
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 16:55 2024/7/23
func GetHttpHandleConfig() *HttpHandleConfig {
return &HttpHandleConfig{
EnableExtensionOutput: inputHttpHandleConfig.EnableExtensionOutput,
@@ -129,8 +117,8 @@ func GetHttpHandleConfig() *HttpHandleConfig {
}
type LogicAfterResponse struct {
SuccessHookFuncList []func(ctx *gin.Context) `json:"-"` // 请求最后需要执行的成功hook函数
FailureHookFuncList []func(ctx *gin.Context) `json:"-"` // 请求最后需要执行的失败hook函数
SuccessHookFuncList []func(ctx *gin.Context) `json:"-"` // 请求最后需要执行的成功 hook函数
FailureHookFuncList []func(ctx *gin.Context) `json:"-"` // 请求最后需要执行的失败 hook函数
Lock *sync.RWMutex `json:"-"` // 逻辑锁
}