middleware

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

CORS跨域中间件

func InitAuth

func InitAuth() (*jwt.GinJWTMiddleware, error)

初始化jwt中间件

func RequestIdMiddleware

func RequestIdMiddleware() gin.HandlerFunc

Types

type JwtToken

type JwtToken struct {
	Token   string `json:"token"`   // token
	Expires string `json:"expires"` // 时间
}

Jump to

Keyboard shortcuts

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