feat: 升级hook处理逻辑
This commit is contained in:
@@ -25,6 +25,7 @@ const (
|
||||
TagNameUriTag = "tag" // 接口的tag
|
||||
TagNameDesc = "desc" // 接口的描述
|
||||
TagNameOutputStrict = "output_strict" // 接口数据是否为严格模式 : 严格模式, 响应数据必须是结构体/map,非严格模式返回任意值
|
||||
TagNameHookSync = "hook-sync" // hook同步执行
|
||||
TagNameBinding = "binding" // gin 内置的验证规则tag
|
||||
TagNameValidate = "validate" // validator v10 默认的验证规则tag
|
||||
TagNameErrMsg = "err" // 验证失败错误信息tag
|
||||
@@ -41,6 +42,7 @@ type UriConfig struct {
|
||||
TagList []string `json:"tag_list"` // 接口分组
|
||||
Desc string `json:"desc"` // 接口描述
|
||||
OutputStrict bool `json:"output_strict"` // 接口是否为严格模式 : 不配置,可返回任意类型, 配置, 必须返回结构体或者map
|
||||
HookSync bool `json:"hook_sync"` // 接口主逻辑执行完成之后,hook是否同步执行, 默认异步执行
|
||||
FormDataType reflect.Type `json:"-"` // 表单数据类型
|
||||
ResultDataType reflect.Type `json:"-"` // 返回值数据类型
|
||||
ApiStructValue reflect.Value `json:"-"` // 逻辑函数所属结构体取值
|
||||
@@ -48,10 +50,6 @@ type UriConfig struct {
|
||||
}
|
||||
|
||||
// UriParam 接口参数配置
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 15:40 2025/1/27
|
||||
type UriParam struct {
|
||||
Field string `json:"field"` // 结构体字段
|
||||
Name string `json:"name"` // 参数名称
|
||||
|
||||
Reference in New Issue
Block a user