middleware

package
v0.0.0-...-8c67d6e Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 17 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cors

func Cors() gin.HandlerFunc

func GetUserRole

func GetUserRole(c *gin.Context) (err error, role []model.SysRole)

func I18nHandler

func I18nHandler() gin.HandlerFunc

func JwtHandler

func JwtHandler() gin.HandlerFunc

func LogOperationHandler

func LogOperationHandler() gin.HandlerFunc

func RoleApiHandler

func RoleApiHandler() gin.HandlerFunc

Types

type I18nEmbedLoader

type I18nEmbedLoader struct {
	FS embed.FS
}

func (*I18nEmbedLoader) LoadMessage

func (c *I18nEmbedLoader) LoadMessage(path string) ([]byte, error)

type Jwt

type Jwt struct {
	SigningKey []byte
}

func MakeJwt

func MakeJwt() (*Jwt, error)

func (*Jwt) ParseToken

func (j *Jwt) ParseToken(tokenString string) (*model.SysJwtClaims, error)

Jump to

Keyboard shortcuts

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