foundation

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: GPL-3.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendMap

func AppendMap(Target map[string]interface{}, Source map[string]interface{}) map[string]interface{}

AppendMap map append map

func ArrayShift

func ArrayShift(Target []map[string]interface{}) (map[string]interface{}, []map[string]interface{})

ArrayShift Array Type []map[string]interface{}

func ByteToJSON

func ByteToJSON(jsByte []byte) map[string]interface{}

ByteToJSON ...

func CheckGameType

func CheckGameType(serverGameTypeID, clientGameTypeID string) messagehandle.ErrorMsg

CheckGameType Check Game Type

func CheckToken

func CheckToken(serverToken, clientToken string) messagehandle.ErrorMsg

CheckToken Check Token func

func ConevrToTimeInt64

func ConevrToTimeInt64(year int, month time.Month, day, hour, min, sec, nsec int) int64

ConevrToTimeInt64 Get time point

func CopyArray

func CopyArray(source []int) []int

CopyArray new array memory array

func DeleteArrayElement

func DeleteArrayElement(elementIndex interface{}, array []interface{}) []interface{}

DeleteArrayElement ...

func GetFuncName

func GetFuncName(fun interface{}) string

GetFuncName return func Name

func InterfaceToBool

func InterfaceToBool(v interface{}) bool

InterfaceToBool ...

func InterfaceToDynamicInt

func InterfaceToDynamicInt(v interface{}) code.Code

InterfaceToDynamicInt ...

func InterfaceToInt

func InterfaceToInt(v interface{}) int

InterfaceToInt ...

func InterfaceToInt64

func InterfaceToInt64(v interface{}) int64

InterfaceToInt64 ...

func InterfaceToString

func InterfaceToString(v interface{}) string

InterfaceToString ...

func InterfaceTofloat64

func InterfaceTofloat64(v interface{}) float64

InterfaceTofloat64 ...

func IsInclude

func IsInclude(target int, src []int) bool

IsInclude ...

func JSONToString

func JSONToString(v interface{}) string

JSONToString conver JsonStruct to JsonString

func MD5Code

func MD5Code(data string) string

MD5Code encode MD5

func MapToArray

func MapToArray(mapData map[int64]int64) (keys, values []int64)

MapToArray return map keys and values

func NewAccount

func NewAccount(plant, account string) string

NewAccount convert all plant account to server account

func NewGameAccount

func NewGameAccount(encodeStr, account string) string

NewGameAccount new game account

func NewToken

func NewToken(gameAccount string) string

NewToken ...

func RandomMutily

func RandomMutily(rangeInt []int, pickCount int) []int

RandomMutily ...

func RangeRandom

func RangeRandom(rangeInt []int) int

RangeRandom array random index

func RangeRandomInt64

func RangeRandomInt64(rangeInt []int64) int

RangeRandomInt64 array random index

func ServerNow

func ServerNow() time.Time

ServerNow Get now time

func ServerNowTime

func ServerNowTime() int64

ServerNowTime Get now Unix time

func ServerTotalPayScoreKey

func ServerTotalPayScoreKey(GameIndex int) string

ServerTotalPayScoreKey ...

func StringToJSON

func StringToJSON(jsStr string) map[string]interface{}

StringToJSON ...

func ToJSONStr

func ToJSONStr(data interface{}) []byte

ToJSONStr Convert to json string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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