Documentation ¶
Index ¶
- Constants
- Variables
- func AddUint64ToSlice(slice []uint64, value uint64) []uint64
- func AddVersionInfoBeforeData(data []byte, version int32) []byte
- func Base64Decode(in string) string
- func Base64Encode(in string) string
- func BitIsSet(value uint32, position uint32) bool
- func BoolToString(input bool) string
- func CheckTileidValid(id int32) bool
- func CombineMap(m1 ...map[string]string) map[string]string
- func ComputeInt32Slice(slice []int32) int32
- func ComputeUint32Slice(slice []uint32) uint32
- func ConverToInt32(in interface{}) int32
- func ConverToInt64(in interface{}) int64
- func ConverToUint32(in interface{}) uint32
- func ConverToUint64(in interface{}) uint64
- func ConvertCoordinateToId(x int32, y int32, sid int32) int32
- func ConvertIdToCoordinate(id int32) (int32, int32, int32)
- func ConvertMainCityCoordinateToId(x, y uint32) uint32
- func ConvertMainCityIdToCoordinate(id uint32) (uint32, uint32)
- func ConvertToBytes(in interface{}) []byte
- func ConvertToString(in interface{}) string
- func CopyUint64Map(in map[uint64]uint64) map[uint64]uint64
- func CopyUint64Slice(input []uint64) []uint64
- func DelNum(a, b int32) int32
- func DeleteInt64ToSlice(slice []int64, value int64) []int64
- func DeleteUint32FromSlice(slice []uint32, value uint32) []uint32
- func DeleteUint64ToSlice(slice []uint64, value uint64) []uint64
- func Error(args ...interface{})
- func ErrorDepth(depth int, args ...interface{})
- func Float64ToString(input float64) string
- func FlushNow()
- func GenGuid() string
- func GetChunkIdx(tileId int32) int
- func GetMd5String(s string) string
- func GetNextMonday(tm int64, offset int) int64
- func GetNow() int64
- func GetNowTime(tm int64, offset int) time.Time
- func GetRandPerm(in int) []int
- func GetRandomNum(in int32) int32
- func GetSFUID() int64
- func GetTodayZeroClock(tm int64, offset int) int64
- func GetValueByPR(pr, values []int32) int32
- func GetWeek(tm int64, offset int) uint32
- func Info(args ...interface{})
- func InfoDepth(depth int, args ...interface{})
- func InitSnowFlake(serverID int64)
- func Initialize(logLevel uint32, toSTD bool, serverid int64)
- func InsertSplitK(u64 uint64) string
- func Int32SliceContant(slice []int32, value int32) bool
- func Int32ToString(input int32) string
- func Int64ToString(input int64) string
- func IsDirExists(path string) bool
- func IsFileExists(file string) bool
- func IsMobile(text string) bool
- func Max(a, b int32) int32
- func MemSet(s unsafe.Pointer, c byte, n uintptr)
- func Min(a, b int32) int32
- func ParseParameterStringToMap(in string) map[string]string
- func ParseStringToFloat64List(input string) []float64
- func ParseStringToInt64List(input string) []int64
- func ParseStringToMap(input string) (map[uint64]uint64, map[uint64]uint64)
- func ParseStringToUint32List(input string) []uint32
- func ParseStringToUint64List(input string) []uint64
- func ParseTimeToUnixTime(in string, offset int) int64
- func ProcessTime(duration uint64) string
- func ResetBit(value *uint32, position uint32)
- func SetBit(value *uint32, position uint32)
- func StartTestSFUID()
- func StatueFuncArrayToMap(keys []string, values []uint32) map[string]uint32
- func StatueFuncArrayToString(keys []string, values []uint32, perValue uint32) string
- func StatueFuncMapToString(d map[string]string) string
- func StringFormatGtime(dateStr string) int64
- func StringSliceContant(slice []string, value string) bool
- func StringToBool(input string) bool
- func StringToFloat64(input string) float64
- func StringToInt(input string) int
- func StringToInt32(input string) int32
- func StringToInt64(input string) int64
- func StringToUint32(input string) uint32
- func StringToUint64(input string) uint64
- func TimeFormatString(duration uint64) string
- func Uint32SliceContant(slice []uint32, value uint32) bool
- func Uint32ToString(input uint32) string
- func Uint64SliceContant(slice []uint64, value uint64) bool
- func Uint64ToString(input uint64) string
- func VerifyFBTokenID(idToken, FBAppID, FBAppSecret string) string
- func VerifyGameCenter(username, data, sig, puk string) string
- func VerifyGoogleIDToken(idToken string, GoogleClientID string) string
- func VerifyTwitterCredentials(token, secret, TTConsumerKey, TTConsumerSecret string) string
- func Warning(args ...interface{})
- type SnowFlake
Constants ¶
View Source
const ( MapLength int32 = 990 MapHeight int32 = 990 ChunkSize int32 = 30 MainCityLength uint32 = 200 MainCityHeight uint32 = 200 MainCitySize = MainCityLength * MainCityHeight WorldMainCityWidth int32 = 2 WorldMainCityHeight int32 = 2 )
Variables ¶
View Source
var ( Count_handler sync.Map Count_handler_num sync.Map )
View Source
var ( BuffPool = sync.Pool{ New: func() interface{} { return bytes.NewBuffer([]byte{}) }, } )
View Source
var (
Interval int64 = 0
)
Functions ¶
func AddUint64ToSlice ¶
func Base64Decode ¶
func Base64Encode ¶
func BoolToString ¶
func CheckTileidValid ¶
func ComputeInt32Slice ¶
func ComputeUint32Slice ¶
func ConverToInt32 ¶
func ConverToInt32(in interface{}) int32
func ConverToInt64 ¶
func ConverToInt64(in interface{}) int64
func ConverToUint32 ¶
func ConverToUint32(in interface{}) uint32
func ConverToUint64 ¶
func ConverToUint64(in interface{}) uint64
func ConvertToBytes ¶
func ConvertToBytes(in interface{}) []byte
func ConvertToString ¶
func ConvertToString(in interface{}) string
func CopyUint64Slice ¶
func DeleteInt64ToSlice ¶
func DeleteUint32FromSlice ¶
func DeleteUint64ToSlice ¶
func ErrorDepth ¶
func ErrorDepth(depth int, args ...interface{})
func Float64ToString ¶
func GetChunkIdx ¶
func GetMd5String ¶
func GetNextMonday ¶
func GetRandPerm ¶
func GetRandomNum ¶
func GetTodayZeroClock ¶
func GetValueByPR ¶
func InitSnowFlake ¶
func InitSnowFlake(serverID int64)
func Initialize ¶
func InsertSplitK ¶
func Int32SliceContant ¶
func Int32ToString ¶
func Int64ToString ¶
func IsDirExists ¶
func IsFileExists ¶
func ParseStringToInt64List ¶
func ParseStringToUint32List ¶
func ParseStringToUint64List ¶
func ParseTimeToUnixTime ¶
func ProcessTime ¶
func StatueFuncArrayToMap ¶
* @brief 雕像加成key-value array转换为map
func StatueFuncArrayToString ¶
* @brief 雕像加成key-value array转换为string
func StatueFuncMapToString ¶
func StringFormatGtime ¶
parse string(DATE) like 20170804 to UTC timestamp
func StringSliceContant ¶
func StringToBool ¶
func StringToFloat64 ¶
func StringToInt ¶
func StringToInt32 ¶
func StringToInt64 ¶
func StringToUint32 ¶
func StringToUint64 ¶
func TimeFormatString ¶
func Uint32SliceContant ¶
func Uint32ToString ¶
func Uint64SliceContant ¶
func Uint64ToString ¶
func VerifyFBTokenID ¶
func VerifyGameCenter ¶
func VerifyGoogleIDToken ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.