Documentation
¶
Index ¶
- Constants
- func DeepCopy(source interface{}, target interface{}) error
- func GenerateKeyMapFromStructSlice(sl interface{}) map[interface{}]uint8
- func GetFieldInfo(value interface{}) map[string]interface{}
- func GetFieldValueByName(value interface{}, name string) interface{}
- func GetFieldValueByRealName(value interface{}, name string) interface{}
- func GetHashAndRangeKey(value interface{}, useTag bool) (hashKey string, rangeKey string)
- func GetHashAndRangeValue(value interface{}) (hashValue interface{}, rangeValue interface{})
- func GetHashName(model interface{}) string
- func GetInterfacePtr(value interface{}) interface{}
- func GetPointer(value interface{}) interface{}
- func GetSliceFromInterfacePtr(value interface{}) []interface{}
- func GetSliceStructName(value interface{}) string
- func GetStructName(value interface{}) string
- func GetStructOnlyName(value interface{}) string
- func GetStructVersionFromOriginData(value interface{}) (uint64, error)
- func GetVersionFieldPath(value interface{}) string
- func LowerAllChar(s string) string
- func TrySetStructDefaultValue(value interface{}) error
- func TrySetStructVersion(value interface{}) (uint64, error)
Constants ¶
View Source
const ( VersionMark = "Version" TagHashMark = "hash" TagRangeMark = "range" )
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyMapFromStructSlice ¶
func GenerateKeyMapFromStructSlice(sl interface{}) map[interface{}]uint8
GenerateKeyMapFromStructSlice sl为StorageModel数组 []Storage
func GetFieldInfo ¶ added in v0.1.0
func GetFieldInfo(value interface{}) map[string]interface{}
GetFieldInfo 获取结构体中除了特定标签外的所有字段的名称和值
func GetFieldValueByName ¶
func GetFieldValueByName(value interface{}, name string) interface{}
func GetFieldValueByRealName ¶
func GetFieldValueByRealName(value interface{}, name string) interface{}
func GetHashAndRangeKey ¶
func GetHashAndRangeValue ¶ added in v0.1.0
func GetHashAndRangeValue(value interface{}) (hashValue interface{}, rangeValue interface{})
func GetInterfacePtr ¶
func GetInterfacePtr(value interface{}) interface{}
func GetPointer ¶ added in v0.1.1
func GetPointer(value interface{}) interface{}
func GetSliceFromInterfacePtr ¶
func GetSliceFromInterfacePtr(value interface{}) []interface{}
func GetSliceStructName ¶
func GetSliceStructName(value interface{}) string
func GetStructName ¶
func GetStructName(value interface{}) string
func GetStructOnlyName ¶
func GetStructOnlyName(value interface{}) string
func GetStructVersionFromOriginData ¶
GetStructVersionFromOriginData 获取版本
func GetVersionFieldPath ¶ added in v0.1.4
func GetVersionFieldPath(value interface{}) string
func LowerAllChar ¶ added in v0.1.0
func TrySetStructDefaultValue ¶ added in v0.1.1
func TrySetStructDefaultValue(value interface{}) error
func TrySetStructVersion ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.