util

package
v0.0.0-...-78a7f46 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCaptcha

func CreateCaptcha() string

生成6位随机验证码

func EncodeMD5

func EncodeMD5(value string) string

func GenerateToken

func GenerateToken(username, password string) (string, error)

生成Token密钥用于身份验证

func GetPage

func GetPage(c *gin.Context) int

GetPage get page parameters

func IsPasswordUsable

func IsPasswordUsable(password string) bool

用户密码是否可用

1.查询用户密码是否不少于6位

func Setup

func Setup()

Setup Initialize the util

Types

type Claims

type Claims struct {
	Username string `json:"username"`
	Password string `json:"password"`
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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