middleware

package
v0.0.0-...-cc9c887 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenToken

func GenToken(username string, isActive, isAdmin bool) (string, error)

func GinLogger

func GinLogger() gin.HandlerFunc

func GinRecovery

func GinRecovery(stack bool) gin.HandlerFunc

func InitLogger

func InitLogger() (err error)

func IsAdminAuth

func IsAdminAuth() func(c *gin.Context)

func JWTMiddlewares

func JWTMiddlewares() func(c *gin.Context)

Types

type CustomClaims

type CustomClaims struct {
	Username string `json:"user_name"`
	IsActive bool   `json:"is_active"`
	IsAdmin  bool   `json:"is_admin"`
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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