util

package module
v0.0.0-...-3ff4a92 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: MIT Imports: 5 Imported by: 0

README

go-util

logcolor

让 log 输出给点 color see see,源于 xcltapestry/xclpkg/clcolor

##reply Api 通信数据结构以及错误返回

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ObjectIdsHexInArray

func ObjectIdsHexInArray(strArr []string) (arr []bson.ObjectId)

ObjectIdsHexInArray []string to []bson.ObjectId

func PanicOnError

func PanicOnError(err error)

PanicOnError 当错误时输出并停止运行

func PasswordCompare

func PasswordCompare(pwd string, hash []byte) bool

PasswordCompare 密码对比

func PasswordEncrypt

func PasswordEncrypt(pwd string) []byte

PasswordEncrypt 密码加密

func TokenDecrypt

func TokenDecrypt(tokenString string, key string) (jwt.MapClaims, bool)

TokenDecrypt 解析密钥

func TokenEncrypt

func TokenEncrypt(m jwt.MapClaims, key string) (string, bool)

TokenEncrypt 生成密钥

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