utils

package
v0.0.0-...-0e87cb9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fail

func Fail(ctx *gin.Context, code int, msg string, data gin.H)

func GetFileMd5

func GetFileMd5(file *multipart.FileHeader) string

func ReleaseToken

func ReleaseToken(user model.User) (string, error)

func Response

func Response(ctx *gin.Context, httpStatus int, code int, data gin.H, msg string)

func Success

func Success(ctx *gin.Context, data gin.H, msg string)

Types

type Claims

type Claims struct {
	UserId uint64
	jwt.RegisteredClaims
}

func ParseToken

func ParseToken(tokenString string) (*jwt.Token, *Claims, error)

Jump to

Keyboard shortcuts

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