middleware

package
v0.0.0-...-04312dd Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckToken

func CheckToken(c *gin.Context) (success bool, newToken string)

func Cors

func Cors() gin.HandlerFunc

func GetLogger

func GetLogger(c *gin.Context, logger *zap.Logger) *zap.Logger

func GetTenantId

func GetTenantId(c *gin.Context) uint

func GetToken

func GetToken(c *gin.Context) string

func JwtAuth

func JwtAuth() gin.HandlerFunc

func Logger

func Logger(logger *zap.Logger) gin.HandlerFunc

func Recovery

func Recovery(logger *zap.Logger) gin.HandlerFunc

func RequestId

func RequestId(c *gin.Context)

func SetGinDB

func SetGinDB(transaction bool, c *gin.Context) *gorm.DB

func SetUserJwt

func SetUserJwt(userId uint, clientId, account, token string, c *gin.Context)

func Transaction

func Transaction(logger *zap.Logger) func(c *gin.Context)

func WebApiToken

func WebApiToken() gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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