util

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JwtSecret = []byte(setting.AppSetting.JwtSecret)

Functions

func EncodeMD5

func EncodeMD5(value string) string

func GenerateToken

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

func GetIdFromClaims

func GetIdFromClaims(key string, claims jwt.Claims) string

func GetPage

func GetPage(c *gin.Context) int

func RemoveRepByMap added in v1.4.0

func RemoveRepByMap(slc []string) []string

Types

type Claims

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

func ParseToken

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

Jump to

Keyboard shortcuts

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