优化枚举值定义
This commit is contained in:
		
							
								
								
									
										143
									
								
								data_type.go
									
									
									
									
									
								
							
							
						
						
									
										143
									
								
								data_type.go
									
									
									
									
									
								
							@ -7,64 +7,89 @@
 | 
				
			|||||||
// Date : 2024-04-08 16:33
 | 
					// Date : 2024-04-08 16:33
 | 
				
			||||||
package consts
 | 
					package consts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					// DataType 数据类型枚举值
 | 
				
			||||||
	"git.zhangdeman.cn/zhangdeman/consts/enums"
 | 
					//
 | 
				
			||||||
)
 | 
					// Author : go_developer@163.com<白茶清欢>
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Date : 14:10 2024/11/25
 | 
				
			||||||
 | 
					type DataType string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (df DataType) String() string {
 | 
				
			||||||
 | 
						return string(df)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (df DataType) MarshalJSON() ([]byte, error) {
 | 
				
			||||||
 | 
						return []byte(df.String()), nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// IsValid 判断枚举值是否有效
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Author : go_developer@163.com<白茶清欢>
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Date : 14:45 2024/11/25
 | 
				
			||||||
 | 
					func (df DataType) IsValid() bool {
 | 
				
			||||||
 | 
						for _, item := range DataTypeList {
 | 
				
			||||||
 | 
							if item.Value == df {
 | 
				
			||||||
 | 
								return true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return false
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	DataTypeUnknown                      enums.DataType = "unknown"                   // 位置数据类型
 | 
						DataTypeUnknown                      DataType = "unknown"                   // 位置数据类型
 | 
				
			||||||
	DataTypeNil                          enums.DataType = "nil"                       // nil
 | 
						DataTypeNil                          DataType = "nil"                       // nil
 | 
				
			||||||
	DataTypePtr                          enums.DataType = "ptr"                       // 指针
 | 
						DataTypePtr                          DataType = "ptr"                       // 指针
 | 
				
			||||||
	DataTypeInt                          enums.DataType = "int"                       // int类型 -> int64
 | 
						DataTypeInt                          DataType = "int"                       // int类型 -> int64
 | 
				
			||||||
	DataTypeUint                         enums.DataType = "uint"                      // uint类型 -> uint64
 | 
						DataTypeUint                         DataType = "uint"                      // uint类型 -> uint64
 | 
				
			||||||
	DataTypeFloat                        enums.DataType = "float"                     // float类型 -> float64
 | 
						DataTypeFloat                        DataType = "float"                     // float类型 -> float64
 | 
				
			||||||
	DataTypeBool                         enums.DataType = "bool"                      // bool类型
 | 
						DataTypeBool                         DataType = "bool"                      // bool类型
 | 
				
			||||||
	DataTypeString                       enums.DataType = "string"                    // 字符串类型
 | 
						DataTypeString                       DataType = "string"                    // 字符串类型
 | 
				
			||||||
	DataTypeSliceAny                     enums.DataType = "[]any"                     // any数组 -> []any
 | 
						DataTypeSliceAny                     DataType = "[]any"                     // any数组 -> []any
 | 
				
			||||||
	DataTypeSliceAnyWithMarshal          enums.DataType = "[]any_marshal"             // any数组 -> []any, json序列化之后的结构
 | 
						DataTypeSliceAnyWithMarshal          DataType = "[]any_marshal"             // any数组 -> []any, json序列化之后的结构
 | 
				
			||||||
	DataTypeSliceInt                     enums.DataType = "[]int"                     // int数组 -> []int64
 | 
						DataTypeSliceInt                     DataType = "[]int"                     // int数组 -> []int64
 | 
				
			||||||
	DataTypeSliceIntWithChar             enums.DataType = "[]int_split"               // int数组 -> []int64, 按照指定字符切割
 | 
						DataTypeSliceIntWithChar             DataType = "[]int_split"               // int数组 -> []int64, 按照指定字符切割
 | 
				
			||||||
	DataTypeSliceIntWithMarshal          enums.DataType = "[]int_marshal"             // int数组 -> []int64, json序列化之后的结果
 | 
						DataTypeSliceIntWithMarshal          DataType = "[]int_marshal"             // int数组 -> []int64, json序列化之后的结果
 | 
				
			||||||
	DataTypeSliceUint                    enums.DataType = "[]uint"                    // uint数组 -> []uint64
 | 
						DataTypeSliceUint                    DataType = "[]uint"                    // uint数组 -> []uint64
 | 
				
			||||||
	DataTypeSliceUintWithChar            enums.DataType = "[]uint_split"              // uint数组 -> []uint64, 指定字符切割
 | 
						DataTypeSliceUintWithChar            DataType = "[]uint_split"              // uint数组 -> []uint64, 指定字符切割
 | 
				
			||||||
	DataTypeSliceUintWithMarshal         enums.DataType = "[]uint_marshal"            // uint数组 -> []uint64, json序列化之后的结果
 | 
						DataTypeSliceUintWithMarshal         DataType = "[]uint_marshal"            // uint数组 -> []uint64, json序列化之后的结果
 | 
				
			||||||
	DataTypeSliceFloat                   enums.DataType = "[]float"                   // float数组 -> []float64
 | 
						DataTypeSliceFloat                   DataType = "[]float"                   // float数组 -> []float64
 | 
				
			||||||
	DataTypeSliceFloatWithChar           enums.DataType = "[]float_split"             // float数组 -> []float64, 指定字符切割
 | 
						DataTypeSliceFloatWithChar           DataType = "[]float_split"             // float数组 -> []float64, 指定字符切割
 | 
				
			||||||
	DataTypeSliceFloatWithMarshal        enums.DataType = "[]float_marshal"           // float数组 -> []float64, json序列化之后的结果
 | 
						DataTypeSliceFloatWithMarshal        DataType = "[]float_marshal"           // float数组 -> []float64, json序列化之后的结果
 | 
				
			||||||
	DataTypeSliceBool                    enums.DataType = "[]bool"                    // bool数组 -> []bool
 | 
						DataTypeSliceBool                    DataType = "[]bool"                    // bool数组 -> []bool
 | 
				
			||||||
	DataTypeSliceBoolWithChar            enums.DataType = "[]bool_split"              // bool数组 -> []bool, 指定字符切割
 | 
						DataTypeSliceBoolWithChar            DataType = "[]bool_split"              // bool数组 -> []bool, 指定字符切割
 | 
				
			||||||
	DataTypeSliceBoolWithMarshal         enums.DataType = "[]bool_marshal"            // bool数组 -> []bool, json序列化之后的结果
 | 
						DataTypeSliceBoolWithMarshal         DataType = "[]bool_marshal"            // bool数组 -> []bool, json序列化之后的结果
 | 
				
			||||||
	DataTypeSliceString                  enums.DataType = "[]string"                  // 字符串数组 -> []string
 | 
						DataTypeSliceString                  DataType = "[]string"                  // 字符串数组 -> []string
 | 
				
			||||||
	DataTypeSliceStringWithChar          enums.DataType = "[]string_split"            // 字符串数组 -> []string, 指定字符切割
 | 
						DataTypeSliceStringWithChar          DataType = "[]string_split"            // 字符串数组 -> []string, 指定字符切割
 | 
				
			||||||
	DataTypeSliceStringWithMarshal       enums.DataType = "[]string_marshal"          // 字符串数组 -> []string, json序列化之后的结果
 | 
						DataTypeSliceStringWithMarshal       DataType = "[]string_marshal"          // 字符串数组 -> []string, json序列化之后的结果
 | 
				
			||||||
	DataTypeSliceSlice                   enums.DataType = "[][]any"                   // 字符串数组 -> [][]any
 | 
						DataTypeSliceSlice                   DataType = "[][]any"                   // 字符串数组 -> [][]any
 | 
				
			||||||
	DataTypeSliceSliceWithMarshal        enums.DataType = "[][]any_marshal"           // 字符串数组 -> [][]any,json序列化之后的结果
 | 
						DataTypeSliceSliceWithMarshal        DataType = "[][]any_marshal"           // 字符串数组 -> [][]any,json序列化之后的结果
 | 
				
			||||||
	DataTypeSliceMapAnyAny               enums.DataType = "[]map[any]any"             // 字符串数组 -> []map[any]any, slice对象
 | 
						DataTypeSliceMapAnyAny               DataType = "[]map[any]any"             // 字符串数组 -> []map[any]any, slice对象
 | 
				
			||||||
	DataTypeSliceMapAnyAnyWithMarshal    enums.DataType = "[]map[any]any_marshal"     // 字符串数组 -> []map[any]any, json序列化后的结果
 | 
						DataTypeSliceMapAnyAnyWithMarshal    DataType = "[]map[any]any_marshal"     // 字符串数组 -> []map[any]any, json序列化后的结果
 | 
				
			||||||
	DataTypeSliceMapStringAny            enums.DataType = "[]map[string]any"          // 字符串数组 -> map[string]any, slice对象
 | 
						DataTypeSliceMapStringAny            DataType = "[]map[string]any"          // 字符串数组 -> map[string]any, slice对象
 | 
				
			||||||
	DataTypeSliceMapStringAnyWithMarshal                = "[]map[string]any_marshal"  // 字符串数组 -> []map[string]any, slice对象, json序列化之后的结果
 | 
						DataTypeSliceMapStringAnyWithMarshal          = "[]map[string]any_marshal"  // 字符串数组 -> []map[string]any, slice对象, json序列化之后的结果
 | 
				
			||||||
	DataTypeMapStrInt                    enums.DataType = "map[string]int"            // map -> map[string]int64
 | 
						DataTypeMapStrInt                    DataType = "map[string]int"            // map -> map[string]int64
 | 
				
			||||||
	DataTypeMapStrIntWithMarshal         enums.DataType = "map[string]int_marshal"    // map -> map[string]int64,json序列化之后的结果
 | 
						DataTypeMapStrIntWithMarshal         DataType = "map[string]int_marshal"    // map -> map[string]int64,json序列化之后的结果
 | 
				
			||||||
	DataTypeMapStrUint                   enums.DataType = "map[string]uint"           // map -> map[string]uint64
 | 
						DataTypeMapStrUint                   DataType = "map[string]uint"           // map -> map[string]uint64
 | 
				
			||||||
	DataTypeMapStrUintWithMarshal        enums.DataType = "map[string]uint_marshal"   // map -> map[string]uint64, json序列化之后的结果
 | 
						DataTypeMapStrUintWithMarshal        DataType = "map[string]uint_marshal"   // map -> map[string]uint64, json序列化之后的结果
 | 
				
			||||||
	DataTypeMapStrFloat                  enums.DataType = "map[string]float"          // map -> map[string]float64
 | 
						DataTypeMapStrFloat                  DataType = "map[string]float"          // map -> map[string]float64
 | 
				
			||||||
	DataTypeMapStrFloatWithMarshal       enums.DataType = "map[string]float_marshal"  // map -> map[string]float64, json序列化之后的结果
 | 
						DataTypeMapStrFloatWithMarshal       DataType = "map[string]float_marshal"  // map -> map[string]float64, json序列化之后的结果
 | 
				
			||||||
	DataTypeMapStrBool                   enums.DataType = "map[string]bool"           // map -> map[string]bool
 | 
						DataTypeMapStrBool                   DataType = "map[string]bool"           // map -> map[string]bool
 | 
				
			||||||
	DataTypeMapStrBoolWithMarshal        enums.DataType = "map[string]bool_marshal"   // map -> map[string]bool,json序列换之后的结果
 | 
						DataTypeMapStrBoolWithMarshal        DataType = "map[string]bool_marshal"   // map -> map[string]bool,json序列换之后的结果
 | 
				
			||||||
	DataTypeMapStrAny                    enums.DataType = "map[string]any"            // map -> map[string]any
 | 
						DataTypeMapStrAny                    DataType = "map[string]any"            // map -> map[string]any
 | 
				
			||||||
	DataTypeMapStrAnyWithMarshal         enums.DataType = "map[string]any_marshal"    // map -> map[string]any, json序列化之后的结果
 | 
						DataTypeMapStrAnyWithMarshal         DataType = "map[string]any_marshal"    // map -> map[string]any, json序列化之后的结果
 | 
				
			||||||
	DataTypeMapStrStr                    enums.DataType = "map[string]string"         // map -> map[string]string
 | 
						DataTypeMapStrStr                    DataType = "map[string]string"         // map -> map[string]string
 | 
				
			||||||
	DataTypeMapStrStrWithMarshal         enums.DataType = "map[string]string_marshal" // map -> map[string]string, json序列化之后的结果
 | 
						DataTypeMapStrStrWithMarshal         DataType = "map[string]string_marshal" // map -> map[string]string, json序列化之后的结果
 | 
				
			||||||
	DataTypeMapAnyAny                    enums.DataType = "map[any]any"               // map -> map[any]any
 | 
						DataTypeMapAnyAny                    DataType = "map[any]any"               // map -> map[any]any
 | 
				
			||||||
	DataTypeMapAnyAnyWithMarshal         enums.DataType = "map[any]any_marshal"       // map -> map[any]any, json序列化之后的结果
 | 
						DataTypeMapAnyAnyWithMarshal         DataType = "map[any]any_marshal"       // map -> map[any]any, json序列化之后的结果
 | 
				
			||||||
	DataTypeMapStrSlice                  enums.DataType = "map[string][]any"          // map -> map[string][]any
 | 
						DataTypeMapStrSlice                  DataType = "map[string][]any"          // map -> map[string][]any
 | 
				
			||||||
	DataTypeMapStrSliceWithMarshal       enums.DataType = "map[string][]any_marshal"  // map -> map[string][]any, json 序列化之后的结果
 | 
						DataTypeMapStrSliceWithMarshal       DataType = "map[string][]any_marshal"  // map -> map[string][]any, json 序列化之后的结果
 | 
				
			||||||
	DataTypeAny                          enums.DataType = "any"                       // 任意类型 -> any
 | 
						DataTypeAny                          DataType = "any"                       // 任意类型 -> any
 | 
				
			||||||
	DataTypeStringPtr                    enums.DataType = "string_ptr"                // *string, 字符串指针
 | 
						DataTypeStringPtr                    DataType = "string_ptr"                // *string, 字符串指针
 | 
				
			||||||
	DataTypeIntPtr                       enums.DataType = "int_ptr"                   // *int64, int64指针
 | 
						DataTypeIntPtr                       DataType = "int_ptr"                   // *int64, int64指针
 | 
				
			||||||
	DataTypeUintPtr                      enums.DataType = "uint_ptr"                  // *uint64, uint64指针
 | 
						DataTypeUintPtr                      DataType = "uint_ptr"                  // *uint64, uint64指针
 | 
				
			||||||
	DataTypeFloatPtr                     enums.DataType = "float_ptr"                 // *float64, float64指针
 | 
						DataTypeFloatPtr                     DataType = "float_ptr"                 // *float64, float64指针
 | 
				
			||||||
	DataTypeBoolPtr                      enums.DataType = "bool_ptr"                  // *bool, 字符串指针
 | 
						DataTypeBoolPtr                      DataType = "bool_ptr"                  // *bool, 字符串指针
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
@ -92,8 +117,8 @@ const (
 | 
				
			|||||||
//
 | 
					//
 | 
				
			||||||
// Date : 13:22 2024/6/23
 | 
					// Date : 13:22 2024/6/23
 | 
				
			||||||
type DataTypeDesc struct {
 | 
					type DataTypeDesc struct {
 | 
				
			||||||
	Value       enums.DataType `json:"value"`       // 具体数据类型
 | 
						Value       DataType `json:"value"`       // 具体数据类型
 | 
				
			||||||
	Description string         `json:"description"` // 数据类型描述
 | 
						Description string   `json:"description"` // 数据类型描述
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
@ -163,7 +188,7 @@ var (
 | 
				
			|||||||
// Author : go_developer@163.com<白茶清欢>
 | 
					// Author : go_developer@163.com<白茶清欢>
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Date : 13:24 2024/6/23
 | 
					// Date : 13:24 2024/6/23
 | 
				
			||||||
func getDataTypeDesc(value enums.DataType, description string) DataTypeDesc {
 | 
					func getDataTypeDesc(value DataType, description string) DataTypeDesc {
 | 
				
			||||||
	return DataTypeDesc{
 | 
						return DataTypeDesc{
 | 
				
			||||||
		Value:       value,
 | 
							Value:       value,
 | 
				
			||||||
		Description: description,
 | 
							Description: description,
 | 
				
			||||||
 | 
				
			|||||||
@ -6,33 +6,3 @@
 | 
				
			|||||||
//
 | 
					//
 | 
				
			||||||
// Date : 2024-11-25 14:39
 | 
					// Date : 2024-11-25 14:39
 | 
				
			||||||
package enums
 | 
					package enums
 | 
				
			||||||
 | 
					 | 
				
			||||||
// RequestDataLocation 请求数据所在位置
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Author : go_developer@163.com<白茶清欢>
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Date : 14:40 2024/11/25
 | 
					 | 
				
			||||||
type RequestDataLocation string
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (rdl RequestDataLocation) String() string {
 | 
					 | 
				
			||||||
	return string(rdl)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (rdl RequestDataLocation) MarshalJSON() ([]byte, error) {
 | 
					 | 
				
			||||||
	return []byte(rdl.String()), nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// ResponseDataLocation 响应数据所在位置
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Author : go_developer@163.com<白茶清欢>
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Date : 14:41 2024/11/25
 | 
					 | 
				
			||||||
type ResponseDataLocation string
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (rdl ResponseDataLocation) String() string {
 | 
					 | 
				
			||||||
	return string(rdl)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (rdl ResponseDataLocation) MarshalJSON() ([]byte, error) {
 | 
					 | 
				
			||||||
	return []byte(rdl.String()), nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -6,18 +6,3 @@
 | 
				
			|||||||
//
 | 
					//
 | 
				
			||||||
// Date : 2024-11-25 14:08
 | 
					// Date : 2024-11-25 14:08
 | 
				
			||||||
package enums
 | 
					package enums
 | 
				
			||||||
 | 
					 | 
				
			||||||
// DataType 数据类型枚举值
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Author : go_developer@163.com<白茶清欢>
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Date : 14:10 2024/11/25
 | 
					 | 
				
			||||||
type DataType string
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (df DataType) String() string {
 | 
					 | 
				
			||||||
	return string(df)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (df DataType) MarshalJSON() ([]byte, error) {
 | 
					 | 
				
			||||||
	return []byte(df.String()), nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										78
									
								
								request.go
									
									
									
									
									
								
							
							
						
						
									
										78
									
								
								request.go
									
									
									
									
									
								
							@ -7,33 +7,79 @@
 | 
				
			|||||||
// Date : 2024-04-22 11:04
 | 
					// Date : 2024-04-22 11:04
 | 
				
			||||||
package consts
 | 
					package consts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import "git.zhangdeman.cn/zhangdeman/consts/enums"
 | 
					// RequestDataLocation 请求数据所在位置
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Author : go_developer@163.com<白茶清欢>
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Date : 14:40 2024/11/25
 | 
				
			||||||
 | 
					type RequestDataLocation string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (rdl RequestDataLocation) String() string {
 | 
				
			||||||
 | 
						return string(rdl)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (rdl RequestDataLocation) MarshalJSON() ([]byte, error) {
 | 
				
			||||||
 | 
						return []byte(rdl.String()), nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (rdl RequestDataLocation) IsValid() bool {
 | 
				
			||||||
 | 
						for _, item := range RequestDataLocationList {
 | 
				
			||||||
 | 
							if item.Value == rdl {
 | 
				
			||||||
 | 
								return true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return false
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ResponseDataLocation 响应数据所在位置
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Author : go_developer@163.com<白茶清欢>
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Date : 14:41 2024/11/25
 | 
				
			||||||
 | 
					type ResponseDataLocation string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (rdl ResponseDataLocation) String() string {
 | 
				
			||||||
 | 
						return string(rdl)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (rdl ResponseDataLocation) MarshalJSON() ([]byte, error) {
 | 
				
			||||||
 | 
						return []byte(rdl.String()), nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (rdl ResponseDataLocation) IsValid() bool {
 | 
				
			||||||
 | 
						for _, item := range ResponseDataLocationList {
 | 
				
			||||||
 | 
							if item.Value == rdl {
 | 
				
			||||||
 | 
								return true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return false
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	RequestDataLocationHeader       enums.RequestDataLocation = "HEADER"        // header
 | 
						RequestDataLocationHeader       RequestDataLocation = "HEADER"        // header
 | 
				
			||||||
	RequestDataLocationCookie       enums.RequestDataLocation = "COOKIE"        // cookie
 | 
						RequestDataLocationCookie       RequestDataLocation = "COOKIE"        // cookie
 | 
				
			||||||
	RequestDataLocationBody         enums.RequestDataLocation = "BODY"          // body
 | 
						RequestDataLocationBody         RequestDataLocation = "BODY"          // body
 | 
				
			||||||
	RequestDataLocationQuery        enums.RequestDataLocation = "QUERY"         // query
 | 
						RequestDataLocationQuery        RequestDataLocation = "QUERY"         // query
 | 
				
			||||||
	RequestDataLocationUriPath      enums.RequestDataLocation = "URI_PATH"      // uri路由一部分
 | 
						RequestDataLocationUriPath      RequestDataLocation = "URI_PATH"      // uri路由一部分
 | 
				
			||||||
	RequestDataLocationStatic       enums.RequestDataLocation = "STATIC"        // 静态配置的参数
 | 
						RequestDataLocationStatic       RequestDataLocation = "STATIC"        // 静态配置的参数
 | 
				
			||||||
	RequestDataLocationCustomConfig enums.RequestDataLocation = "CUSTOM_CONFIG" // 针对接口的一些自定义配置规则
 | 
						RequestDataLocationCustomConfig RequestDataLocation = "CUSTOM_CONFIG" // 针对接口的一些自定义配置规则
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	ResponseDataLocationHeader    enums.ResponseDataLocation = "HEADER"    // header
 | 
						ResponseDataLocationHeader    ResponseDataLocation = "HEADER"    // header
 | 
				
			||||||
	ResponseDataLocationCookie    enums.ResponseDataLocation = "COOKIE"    // cookie
 | 
						ResponseDataLocationCookie    ResponseDataLocation = "COOKIE"    // cookie
 | 
				
			||||||
	ResponseDataLocationBody      enums.ResponseDataLocation = "BODY"      // body
 | 
						ResponseDataLocationBody      ResponseDataLocation = "BODY"      // body
 | 
				
			||||||
	ResponseDataLocationExtension enums.ResponseDataLocation = "EXTENSION" // 扩展信息
 | 
						ResponseDataLocationExtension ResponseDataLocation = "EXTENSION" // 扩展信息
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type RequestDataLocationDesc struct {
 | 
					type RequestDataLocationDesc struct {
 | 
				
			||||||
	Value       enums.RequestDataLocation `json:"value"`       // 数据位置
 | 
						Value       RequestDataLocation `json:"value"`       // 数据位置
 | 
				
			||||||
	Description string                    `json:"description"` // 数据位置描述
 | 
						Description string              `json:"description"` // 数据位置描述
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type ResponseDataLocationDesc struct {
 | 
					type ResponseDataLocationDesc struct {
 | 
				
			||||||
	Value       enums.ResponseDataLocation `json:"value"`       // 数据位置
 | 
						Value       ResponseDataLocation `json:"value"`       // 数据位置
 | 
				
			||||||
	Description string                     `json:"description"` // 数据位置描述
 | 
						Description string               `json:"description"` // 数据位置描述
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user