完成基础反射调用接口 + 数据响应

This commit is contained in:
2025-02-07 16:57:15 +08:00
parent 77ea723e86
commit e95061a1a8
6 changed files with 44 additions and 46 deletions

View File

@ -31,14 +31,15 @@ const (
//
// Date : 15:41 2024/7/21
type UriConfig struct {
Path string `json:"path"` // 接口路由, 必须配置
Method string `json:"method"` // 接口请求方法, 必须配置
TagList []string `json:"tag_list"` // 接口分组
Desc string `json:"desc"` // 接口描述
Strict bool `json:"strict"` // 接口是否为严格模式 : 不配置, 则为严格模式.严格模式 : POST 仅解析 BODY , GET 仅解析 QUERY
ParamList []UriParam `json:"param_list"` // 参数信息表
FormDataType reflect.Type `json:"-"` // 表单数据类型
ApiLogicFunc reflect.Method `json:"-"` // 自定义的接口逻辑
Path string `json:"path"` // 接口路由, 必须配置
RequestMethod string `json:"request_method"` // 接口请求方法, 必须配置
TagList []string `json:"tag_list"` // 接口分组
Desc string `json:"desc"` // 接口描述
Strict bool `json:"strict"` // 接口是否为严格模式 : 不配置, 则为严格模式.严格模式 : POST 仅解析 BODY , GET 仅解析 QUERY
ParamList []UriParam `json:"param_list"` // 参数信息表
FormDataType reflect.Type `json:"-"` // 表单数据类型
ApiStructValue reflect.Value `json:"-"` // 逻辑函数所属结构体取值
ApiLogicFunc reflect.Method `json:"-"` // 自定义的接口逻辑
}
// UriParam 接口参数配置