datatype

package
v0.0.0-...-2ec961a Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Array_to_map

func Array_to_map(data interface{}) []map[string]interface{}

func BinStringToByte

func BinStringToByte(str string) int32

func Byte2str

func Byte2str(postdata []map[string][]byte) []map[string]interface{}

func BytesCombine

func BytesCombine(pBytes ...[]byte) []byte

func BytesToInt

func BytesToInt(buf []byte, big_flag bool) int

字节转换成整形

func BytesToInt16

func BytesToInt16(buf []byte, big_flag bool) int16

字节转换成整形

func BytesToInt64

func BytesToInt64(buf []byte) uint64

func BytesToUInt8

func BytesToUInt8(buf []byte) uint8

func CheckSum

func CheckSum(at_str string) []byte

func DataToDBStruct

func DataToDBStruct(data map[string]string, out interface{})

map转结构体

func DataToStruct

func DataToStruct(data map[string]string, out interface{})

map转结构体

func DateStringToGoTime

func DateStringToGoTime(tm string) time.Time

func DecStringTOHexString

func DecStringTOHexString(str1 string) string

10进制字符串转16进制字符串

func FilteredSQLInject

func FilteredSQLInject(to_match_str string) bool

检测是否有注入代码,过滤Sql语句的注入代码

func FormatDate

func FormatDate(key string) string

func FormatFloat

func FormatFloat(val float64, ws int) string

func GenerateRangeNum

func GenerateRangeNum(min, max int) int

func GetCalMonth

func GetCalMonth(date string, mon_sub int) string

func GetMd5String

func GetMd5String(s string) string

func GetRedisValueMap

func GetRedisValueMap(src interface{}) map[string]interface{}

func Get_UUID

func Get_UUID() string

func Has_map_index

func Has_map_index(name string, data map[string]interface{}) bool

func HexByteToBinString

func HexByteToBinString(list []byte) string

16进制字节转8位二进制字符串

func HexByteToDecString

func HexByteToDecString(list []byte) string

16进制字节转10进制字符串

func HexByteToString

func HexByteToString(list []byte) string

16进制字节转字符串

func HexStringToByte

func HexStringToByte(str string) []byte

字符串转byte数组

func Int16ToBytes

func Int16ToBytes(n int, big_flag bool) []byte

整形转换成字节

func Int2Date_str

func Int2Date_str(date int64) string

func Int2Time_str

func Int2Time_str(date int64) string

func Int32ToBytes

func Int32ToBytes(n int, big_flag bool) []byte

整形转换成字节

func Int64ToBytes

func Int64ToBytes(n int64, big_flag bool) []byte

整形转换成字节

func Int64toint

func Int64toint(val int64) int

func Int8ToBytes

func Int8ToBytes(n int, big_flag bool) []byte

整形转换成字节

func InterfaceToStringList

func InterfaceToStringList(data []map[string]interface{}) []map[string]string

func JSON2map

func JSON2map(arr interface{}) map[string]interface{}

func JSON2maplist

func JSON2maplist(arr interface{}) []map[string]interface{}

func Map2Json

func Map2Json(json_data map[string]interface{}) []byte

func Map2str

func Map2str(postdata map[string]interface{}) map[string]string

func MapArray2interface

func MapArray2interface(data []map[string]string) []map[string]interface{}

func MapList2Json

func MapList2Json(json_data []map[string]interface{}) []byte

func MapString2interface

func MapString2interface(data map[string]string) map[string]interface{}

func Replace_map

func Replace_map(data map[string]string, memo string) string

func SafeConvertMap

func SafeConvertMap(m interface{}) map[string]interface{}

func SetAutoBh

func SetAutoBh(strlen int, str_qz string, str_val string) string

func Str2Float

func Str2Float(key string) float64

func Str2Int

func Str2Int(key string) int

func Str2Int64

func Str2Int64(key string) int64

func String2Json

func String2Json(strin string) map[string]interface{}

func String2JsonList

func String2JsonList(strin string) []map[string]interface{}

func String2Time

func String2Time(date string) int64

func String2TimeStamp

func String2TimeStamp(date string) time.Time

func String2date

func String2date(date string) int64

func StringToHexString

func StringToHexString(data string) string

16进制字节转字符串

func Struct2DBMap

func Struct2DBMap(obj interface{}) map[string]interface{}

func Struct2ListMap

func Struct2ListMap(obj interface{}, perfix string) map[string]interface{}

func Struct2Map

func Struct2Map(obj interface{}) map[string]interface{}

结构转map

func StructJson2Map

func StructJson2Map(obj interface{}) map[string]interface{}

结构转map

func ToUP_map_name

func ToUP_map_name(name string) string

下划线转驼峰写法转写法

func Tolow_map_name

func Tolow_map_name(name string) string

驼峰写法转下划线写法

func Type2List

func Type2List(data interface{}) []map[string]interface{}

func Type2Map

func Type2Map(obj interface{}) map[string]interface{}

结构转map

func Type2int

func Type2int(val interface{}) int

func Type2map

func Type2map(data interface{}) map[string]interface{}

func Type2str

func Type2str(val interface{}) string

func UInt8ToBytes

func UInt8ToBytes(n uint8) []byte

func Utf8ToGBK

func Utf8ToGBK(utf8str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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