tools

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionMark  = "Version"
	TagHashMark  = "hash"
	TagRangeMark = "range"
)

Variables

This section is empty.

Functions

func DeepCopy

func DeepCopy(source interface{}, target interface{}) error

func GenerateKeyMapFromStructSlice

func GenerateKeyMapFromStructSlice(sl interface{}) map[interface{}]uint8

GenerateKeyMapFromStructSlice sl为StorageModel数组 []Storage

func GetFieldValueByName

func GetFieldValueByName(value interface{}, name string) interface{}

func GetFieldValueByRealName

func GetFieldValueByRealName(value interface{}, name string) interface{}

func GetHashAndRangeKey

func GetHashAndRangeKey(value interface{}, useTag bool) (hashKey string, rangeKey string)

func GetHashName

func GetHashName(model interface{}) string

GetHashName 获取主键在结构体中的名字

func GetInterfacePtr

func GetInterfacePtr(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

func GetStructVersionFromOriginData(value interface{}) (uint64, error)

GetStructVersionFromOriginData 获取版本

func TrySetStructVersion

func TrySetStructVersion(value interface{}) (uint64, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL