Documentation
¶
Index ¶
- Constants
- Variables
- func AuditLogMiddleware(skipPaths ...string) gin.HandlerFunc
- func GetLanguage(c *gin.Context) string
- func GetMiddlewares(keys ...string) gin.HandlersChain
- func GetSupportedLanguages() []string
- func GetVerify(ctx *gin.Context) security.Verifier
- func Init()
- func IsSupportedLanguage(lang string) bool
- func Language() gin.HandlerFunc
Constants ¶
View Source
const ( LanguageKey = "accept-language" DefaultLang = "zh-CN" )
Variables ¶
View Source
var ( Auth *jwt.GinJWTMiddleware Verifier security.Verifier )
View Source
var Middlewares = &sync.Map{}
Functions ¶
func AuditLogMiddleware ¶ added in v0.7.0
func AuditLogMiddleware(skipPaths ...string) gin.HandlerFunc
func GetLanguage ¶ added in v0.7.0
func GetMiddlewares ¶
func GetMiddlewares(keys ...string) gin.HandlersChain
GetMiddlewares get middlewares by keys
func GetSupportedLanguages ¶ added in v0.7.0
func GetSupportedLanguages() []string
func IsSupportedLanguage ¶ added in v0.7.0
func Language ¶ added in v0.7.0
func Language() gin.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.