2023-05-05 14:46:14 +08:00
|
|
|
// Package wrapper ...
|
|
|
|
//
|
|
|
|
// Description : wrapper ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 2023-05-05 14:44
|
|
|
|
package wrapper
|
|
|
|
|
|
|
|
const (
|
2023-06-01 18:31:21 +08:00
|
|
|
DataTypeUnknown = "unknown"
|
|
|
|
DataTypeNil = "nil"
|
|
|
|
DataTypeAny = "interface"
|
|
|
|
DataTypePtr = "ptr"
|
2023-05-05 14:46:14 +08:00
|
|
|
|
|
|
|
DataTypeString = "string"
|
|
|
|
|
|
|
|
DataTypeInt8 = "int8"
|
|
|
|
DataTypeInt16 = "int16"
|
|
|
|
DataTypeInt32 = "int32"
|
|
|
|
DataTypeInt64 = "int64"
|
|
|
|
DataTypeInt = "int"
|
|
|
|
|
|
|
|
DataTypeUint8 = "uint8"
|
|
|
|
DataTypeUint16 = "uint16"
|
|
|
|
DataTypeUint32 = "uint32"
|
|
|
|
DataTypeUint64 = "uint64"
|
|
|
|
DataTypeUint = "uint"
|
|
|
|
|
|
|
|
DataTypeBool = "bool"
|
|
|
|
|
|
|
|
DataTypeNumber = "number"
|
|
|
|
|
|
|
|
DataTypeFloat32 = "float32"
|
|
|
|
DataTypeFloat64 = "float64"
|
|
|
|
DataTypeDouble = "double"
|
|
|
|
DataTypeFloat = "float"
|
|
|
|
|
|
|
|
DataTypeIntSlice = "[]int"
|
|
|
|
DataTypeUntSlice = "[]uint"
|
|
|
|
DataTypeNumberSlice = "[]number"
|
|
|
|
DataTypeFloatSlice = "[]float"
|
|
|
|
DataTypeBoolSlice = "[]bool"
|
|
|
|
DataTypeAnySlice = "[]interface"
|
|
|
|
|
|
|
|
DataTypeObject = "map[string]interface"
|
|
|
|
DataTypeAnyObject = "map[interface]interface"
|
|
|
|
)
|
2023-05-08 16:59:46 +08:00
|
|
|
|
|
|
|
// Int8Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:25 2023/5/8
|
|
|
|
type Int8Result struct {
|
|
|
|
Value int8
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-15 18:08:56 +08:00
|
|
|
// Int8PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 18:05 2023/5/15
|
|
|
|
type Int8PtrResult struct {
|
|
|
|
Value *int8
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Int16Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:26 2023/5/8
|
|
|
|
type Int16Result struct {
|
|
|
|
Value int16
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-15 18:08:56 +08:00
|
|
|
// Int16PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 18:05 2023/5/15
|
|
|
|
type Int16PtrResult struct {
|
|
|
|
Value *int16
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Int32Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:26 2023/5/8
|
|
|
|
type Int32Result struct {
|
|
|
|
Value int32
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-15 18:08:56 +08:00
|
|
|
// Int32PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 18:04 2023/5/15
|
|
|
|
type Int32PtrResult struct {
|
|
|
|
Value *int32
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Int64Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:26 2023/5/8
|
|
|
|
type Int64Result struct {
|
|
|
|
Value int64
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-15 18:08:56 +08:00
|
|
|
// Int64PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 18:04 2023/5/15
|
|
|
|
type Int64PtrResult struct {
|
|
|
|
Value *int64
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// IntResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:26 2023/5/8
|
|
|
|
type IntResult struct {
|
|
|
|
Value int
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-15 17:53:24 +08:00
|
|
|
// IntPtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:51 2023/5/15
|
|
|
|
type IntPtrResult struct {
|
|
|
|
Value *int
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Uint8Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:28 2023/5/8
|
|
|
|
type Uint8Result struct {
|
|
|
|
Value uint8
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-16 11:00:23 +08:00
|
|
|
// Uint8PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 10:49 2023/5/16
|
|
|
|
type Uint8PtrResult struct {
|
|
|
|
Value *uint8
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Uint16Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:28 2023/5/8
|
|
|
|
type Uint16Result struct {
|
|
|
|
Value uint16
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-16 11:00:23 +08:00
|
|
|
// Uint16PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 10:49 2023/5/16
|
|
|
|
type Uint16PtrResult struct {
|
|
|
|
Value *uint16
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Uint32Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:28 2023/5/8
|
|
|
|
type Uint32Result struct {
|
|
|
|
Value uint32
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-16 11:00:23 +08:00
|
|
|
// Uint32PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 10:49 2023/5/16
|
|
|
|
type Uint32PtrResult struct {
|
|
|
|
Value *uint32
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Uint64Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:28 2023/5/8
|
|
|
|
type Uint64Result struct {
|
|
|
|
Value uint64
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-16 11:00:23 +08:00
|
|
|
// Uint64PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 10:50 2023/5/16
|
|
|
|
type Uint64PtrResult struct {
|
|
|
|
Value *uint64
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// UintResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:29 2023/5/8
|
|
|
|
type UintResult struct {
|
|
|
|
Value uint
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-16 11:00:23 +08:00
|
|
|
// UintPtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 10:51 2023/5/16
|
|
|
|
type UintPtrResult struct {
|
|
|
|
Value *uint
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Float32Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:31 2023/5/8
|
|
|
|
type Float32Result struct {
|
|
|
|
Value float32
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-16 11:56:51 +08:00
|
|
|
// Float32PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 11:10 2023/5/16
|
|
|
|
type Float32PtrResult struct {
|
|
|
|
Value *float32
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Float64Result ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:32 2023/5/8
|
|
|
|
type Float64Result struct {
|
|
|
|
Value float64
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-16 11:00:23 +08:00
|
|
|
// Float64PtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 10:52 2023/5/16
|
|
|
|
type Float64PtrResult struct {
|
|
|
|
Value *float64
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// Any ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:40 2023/5/8
|
|
|
|
type Any struct {
|
|
|
|
Value interface{}
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// BoolResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:36 2023/5/8
|
|
|
|
type BoolResult struct {
|
|
|
|
Value bool
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-16 11:00:23 +08:00
|
|
|
// BoolPtrResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 10:53 2023/5/16
|
|
|
|
type BoolPtrResult struct {
|
|
|
|
Value *bool
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 16:59:46 +08:00
|
|
|
// ObjectResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:38 2023/5/8
|
|
|
|
type ObjectResult struct {
|
|
|
|
Value map[string]interface{}
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// StringResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:57 2023/5/8
|
|
|
|
type StringResult struct {
|
|
|
|
Value string
|
|
|
|
Err error
|
|
|
|
}
|
2023-05-08 18:29:48 +08:00
|
|
|
|
2023-05-15 18:08:56 +08:00
|
|
|
// StringPtrResult 字符串指针
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 18:02 2023/5/15
|
|
|
|
type StringPtrResult struct {
|
|
|
|
Value *string
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 18:29:48 +08:00
|
|
|
// Int8SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:49 2023/5/8
|
|
|
|
type Int8SliceResult struct {
|
|
|
|
Value []int8
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Int16SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:49 2023/5/8
|
|
|
|
type Int16SliceResult struct {
|
|
|
|
Value []int16
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Int32SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:50 2023/5/8
|
|
|
|
type Int32SliceResult struct {
|
|
|
|
Value []int32
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Int64SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:50 2023/5/8
|
|
|
|
type Int64SliceResult struct {
|
|
|
|
Value []int64
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// IntSliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:50 2023/5/8
|
|
|
|
type IntSliceResult struct {
|
|
|
|
Value []int
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Uint8SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:55 2023/5/8
|
|
|
|
type Uint8SliceResult struct {
|
|
|
|
Value []uint8
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Uint16SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:55 2023/5/8
|
|
|
|
type Uint16SliceResult struct {
|
|
|
|
Value []uint16
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Uint32SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:55 2023/5/8
|
|
|
|
type Uint32SliceResult struct {
|
|
|
|
Value []uint32
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Uint64SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:55 2023/5/8
|
|
|
|
type Uint64SliceResult struct {
|
|
|
|
Value []uint64
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// UintSliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 17:56 2023/5/8
|
|
|
|
type UintSliceResult struct {
|
|
|
|
Value []uint
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// BoolSliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 18:22 2023/5/8
|
|
|
|
type BoolSliceResult struct {
|
|
|
|
Value []bool
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Float32SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 18:24 2023/5/8
|
|
|
|
type Float32SliceResult struct {
|
|
|
|
Value []float32
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
|
|
|
// Float64SliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 18:24 2023/5/8
|
|
|
|
type Float64SliceResult struct {
|
|
|
|
Value []float64
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-08-06 15:13:38 +08:00
|
|
|
// StringSliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 15:11 2023/8/6
|
|
|
|
type StringSliceResult struct {
|
|
|
|
Value []string
|
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2023-05-08 18:29:48 +08:00
|
|
|
// AnySliceResult ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 18:28 2023/5/8
|
|
|
|
type AnySliceResult struct {
|
|
|
|
Value []interface{}
|
|
|
|
Err error
|
|
|
|
}
|
2023-08-10 16:58:13 +08:00
|
|
|
|
|
|
|
// MapResult 转map的结果
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:05 2023/8/10
|
|
|
|
type MapResult struct {
|
|
|
|
Value Map
|
|
|
|
Err error
|
|
|
|
}
|