utils

package
v0.0.0-...-f7beccf Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(data []byte, to interface{}) error

Decode 用gob进行数据解码

func DelCache

func DelCache(key string) error

DelCache

func Encode

func Encode(data interface{}) ([]byte, error)

Encode 用gob进行数据编码

func GetCache

func GetCache(key string, to interface{}) error

func InitCache

func InitCache()

func InitLogs

func InitLogs()

func LogAlert

func LogAlert(v interface{})

func LogCritical

func LogCritical(v interface{})

func LogDebug

func LogDebug(v interface{})

func LogEmergency

func LogEmergency(v interface{})

func LogError

func LogError(v interface{})

func LogInfo

func LogInfo(v interface{})

func LogNotice

func LogNotice(v interface{})

func LogTrace

func LogTrace(v interface{})

func LogWarning

func LogWarning(v interface{})

func RandomString

func RandomString(length int) string

RandomString 在数字、大写字母、小写字母范围内生成num位的随机字符串

func SetCache

func SetCache(key string, value interface{}, timeout int) error

SetCache

func String2md5

func String2md5(str string) string

将字符串加密成 md5

Types

This section is empty.

Jump to

Keyboard shortcuts

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