utils

package
v1.0.45 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecode added in v1.0.12

func AesDecode(str, key string) (string, error)

aes+base64 decode

func AesEncode added in v1.0.12

func AesEncode(str, key string) (string, error)

aes+base64 encode

func GenAssetId

func GenAssetId(appId int64) int64

根据app_id生成asset_id

func GenIdHelp

func GenIdHelp(baseId uint64, flag int) uint64

*

  • | 0 - 19 | 20-31 | 32 | 33 - 40 | 41 - 56 | 57 - 60 | 61-63 |
  • | 20位 | 12位 | 1位 | 8位 | 16位 | 4位 | 3位 |
  • | baseId低20位| 随机值 | 标记 | 随机值 | 签名低16位| 随机值 | 0 |

func GenNonce

func GenNonce() int64

生成nonce值

func GenRandId

func GenRandId() uint64

生成伪唯一ID

func GetFuncCall

func GetFuncCall(callDepth int) (string, string)

Get call method by runtime.Caller

func GetHostName added in v1.0.5

func GetHostName() string

func StrSignToInt

func StrSignToInt(content string) uint64

对字符串Hash后转化为整数

Types

This section is empty.

Jump to

Keyboard shortcuts

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