wlog

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

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 AddUint64ToSlice(slice []uint64, value uint64) []uint64

func AddVersionInfoBeforeData

func AddVersionInfoBeforeData(data []byte, version int32) []byte

func Base64Decode

func Base64Decode(in string) string

func Base64Encode

func Base64Encode(in string) string

func BitIsSet

func BitIsSet(value uint32, position uint32) bool

func BoolToString

func BoolToString(input bool) string

func CheckTileidValid

func CheckTileidValid(id int32) bool

func CombineMap

func CombineMap(m1 ...map[string]string) map[string]string

func ComputeInt32Slice

func ComputeInt32Slice(slice []int32) int32

func ComputeUint32Slice

func ComputeUint32Slice(slice []uint32) uint32

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 ConvertCoordinateToId

func ConvertCoordinateToId(x int32, y int32, sid int32) int32

func ConvertIdToCoordinate

func ConvertIdToCoordinate(id int32) (int32, int32, int32)

func ConvertMainCityCoordinateToId

func ConvertMainCityCoordinateToId(x, y uint32) uint32

func ConvertMainCityIdToCoordinate

func ConvertMainCityIdToCoordinate(id uint32) (uint32, uint32)

func ConvertToBytes

func ConvertToBytes(in interface{}) []byte

func ConvertToString

func ConvertToString(in interface{}) string

func CopyUint64Map

func CopyUint64Map(in map[uint64]uint64) map[uint64]uint64

func CopyUint64Slice

func CopyUint64Slice(input []uint64) []uint64

func DelNum

func DelNum(a, b int32) int32

func DeleteInt64ToSlice

func DeleteInt64ToSlice(slice []int64, value int64) []int64

func DeleteUint32FromSlice

func DeleteUint32FromSlice(slice []uint32, value uint32) []uint32

func DeleteUint64ToSlice

func DeleteUint64ToSlice(slice []uint64, value uint64) []uint64

func Error

func Error(args ...interface{})

Error Error

func ErrorDepth

func ErrorDepth(depth int, args ...interface{})

func Float64ToString

func Float64ToString(input float64) string

func FlushNow

func FlushNow()

func GenGuid

func GenGuid() string

func GetChunkIdx

func GetChunkIdx(tileId int32) int

func GetMd5String

func GetMd5String(s string) string

func GetNextMonday

func GetNextMonday(tm int64, offset int) int64

func GetNow

func GetNow() int64

func GetNowTime

func GetNowTime(tm int64, offset int) time.Time

func GetRandPerm

func GetRandPerm(in int) []int

func GetRandomNum

func GetRandomNum(in int32) int32

func GetSFUID

func GetSFUID() int64

func GetTodayZeroClock

func GetTodayZeroClock(tm int64, offset int) int64

func GetValueByPR

func GetValueByPR(pr, values []int32) int32

func GetWeek

func GetWeek(tm int64, offset int) uint32

返回当前时间是当年的第几周

func Info

func Info(args ...interface{})

Info Info

func InfoDepth

func InfoDepth(depth int, args ...interface{})

func InitSnowFlake

func InitSnowFlake(serverID int64)

func Initialize

func Initialize(logLevel uint32, toSTD bool, serverid int64)

func InsertSplitK

func InsertSplitK(u64 uint64) string

func Int32SliceContant

func Int32SliceContant(slice []int32, value int32) bool

func Int32ToString

func Int32ToString(input int32) string

func Int64ToString

func Int64ToString(input int64) string

func IsDirExists

func IsDirExists(path string) bool

func IsFileExists

func IsFileExists(file string) bool

func IsMobile

func IsMobile(text string) bool

func Max

func Max(a, b int32) int32

func MemSet

func MemSet(s unsafe.Pointer, c byte, n uintptr)

func Min

func Min(a, b int32) int32

func ParseParameterStringToMap

func ParseParameterStringToMap(in string) map[string]string

func ParseStringToFloat64List

func ParseStringToFloat64List(input string) []float64

func ParseStringToInt64List

func ParseStringToInt64List(input string) []int64

func ParseStringToMap

func ParseStringToMap(input string) (map[uint64]uint64, map[uint64]uint64)

func ParseStringToUint32List

func ParseStringToUint32List(input string) []uint32

func ParseStringToUint64List

func ParseStringToUint64List(input string) []uint64

func ParseTimeToUnixTime

func ParseTimeToUnixTime(in string, offset int) int64

func ProcessTime

func ProcessTime(duration uint64) string

func ResetBit

func ResetBit(value *uint32, position uint32)

func SetBit

func SetBit(value *uint32, position uint32)

func StartTestSFUID

func StartTestSFUID()

* @brief 测试

func StatueFuncArrayToMap

func StatueFuncArrayToMap(keys []string, values []uint32) map[string]uint32

* @brief 雕像加成key-value array转换为map

func StatueFuncArrayToString

func StatueFuncArrayToString(keys []string, values []uint32, perValue uint32) string

* @brief 雕像加成key-value array转换为string

func StatueFuncMapToString

func StatueFuncMapToString(d map[string]string) string

func StringFormatGtime

func StringFormatGtime(dateStr string) int64

parse string(DATE) like 20170804 to UTC timestamp

func StringSliceContant

func StringSliceContant(slice []string, value string) bool

func StringToBool

func StringToBool(input string) bool

func StringToFloat64

func StringToFloat64(input string) float64

func StringToInt

func StringToInt(input string) int

func StringToInt32

func StringToInt32(input string) int32

func StringToInt64

func StringToInt64(input string) int64

func StringToUint32

func StringToUint32(input string) uint32

func StringToUint64

func StringToUint64(input string) uint64

func TimeFormatString

func TimeFormatString(duration uint64) string

func Uint32SliceContant

func Uint32SliceContant(slice []uint32, value uint32) bool

func Uint32ToString

func Uint32ToString(input uint32) string

func Uint64SliceContant

func Uint64SliceContant(slice []uint64, value uint64) bool

func Uint64ToString

func Uint64ToString(input uint64) string

func VerifyFBTokenID

func VerifyFBTokenID(idToken, FBAppID, FBAppSecret string) string

func VerifyGameCenter

func VerifyGameCenter(username, data, sig, puk string) string

func VerifyGoogleIDToken

func VerifyGoogleIDToken(idToken string, GoogleClientID string) string

func VerifyTwitterCredentials

func VerifyTwitterCredentials(token, secret, TTConsumerKey, TTConsumerSecret string) string

func Warning

func Warning(args ...interface{})

Warning Warning

Types

type SnowFlake

type SnowFlake struct {
	// contains filtered or unexported fields
}
var SFFactory *SnowFlake

Jump to

Keyboard shortcuts

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