util

package
v0.0.0-...-f5118b7 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogrusObj *logrus.Logger

Functions

func GenerateToken

func GenerateToken(userID uint) (string, error)

GenerateToken 签发用户Token

func GracefullyShutdown

func GracefullyShutdown(server *http.Server)

Types

type Claims

type Claims struct {
	UserID uint `json:"user_id"`
	jwt.StandardClaims
}

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