util

package
v0.0.0-...-e0e8746 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeMD5

func EncodeMD5(value string) string

EncodeMD5 MD5加密

func GenerateToken

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

GenerateToken 生成Token

func GetPage

func GetPage(c *gin.Context) int

GetPage 获取页码

func Setup

func Setup()

Setup 初始化

Types

type Claims

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

Claims jwt加密原文

func ParseToken

func ParseToken(token string) (*Claims, error)

ParseToken 解析token

Jump to

Keyboard shortcuts

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