Documentation ¶
Index ¶
- func Cors(options ...func(*CorsOptions)) gin.HandlerFunc
- func Exception(c *gin.Context)
- func Jwt(options ...func(*JwtOptions)) gin.HandlerFunc
- func JwtLogin(options ...func(*JwtOptions)) gin.HandlerFunc
- func WithJwtCookieName(cookieName string) func(*JwtOptions)
- func WithJwtFailWithCodeAndMsg(fun func(code int, format interface{}, a ...interface{})) func(*JwtOptions)
- func WithJwtFailWithMsg(fun func(format interface{}, a ...interface{})) func(*JwtOptions)
- func WithJwtKey(key string) func(*JwtOptions)
- func WithJwtLoginPwdCheck(fun func(c *gin.Context, r req.LoginCheck) (user models.SysUser, err error)) func(*JwtOptions)
- func WithJwtMaxRefresh(maxRefresh int) func(*JwtOptions)
- func WithJwtPrivateBytes(bs []byte) func(*JwtOptions)
- func WithJwtRealm(realm string) func(*JwtOptions)
- func WithJwtSendCookie(flag bool) func(*JwtOptions)
- func WithJwtSuccess(fun func()) func(*JwtOptions)
- func WithJwtTimeout(timeout int) func(*JwtOptions)
- func WithJwtTokenHeaderName(tokenHeaderName string) func(*JwtOptions)
- func WithJwtTokenLookup(tokenLookup string) func(*JwtOptions)
- type CorsOptions
- type JwtOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cors ¶
func Cors(options ...func(*CorsOptions)) gin.HandlerFunc
func Jwt ¶
func Jwt(options ...func(*JwtOptions)) gin.HandlerFunc
func JwtLogin ¶
func JwtLogin(options ...func(*JwtOptions)) gin.HandlerFunc
func WithJwtCookieName ¶
func WithJwtCookieName(cookieName string) func(*JwtOptions)
func WithJwtFailWithCodeAndMsg ¶
func WithJwtFailWithCodeAndMsg(fun func(code int, format interface{}, a ...interface{})) func(*JwtOptions)
func WithJwtFailWithMsg ¶
func WithJwtFailWithMsg(fun func(format interface{}, a ...interface{})) func(*JwtOptions)
func WithJwtKey ¶
func WithJwtKey(key string) func(*JwtOptions)
func WithJwtLoginPwdCheck ¶
func WithJwtLoginPwdCheck(fun func(c *gin.Context, r req.LoginCheck) (user models.SysUser, err error)) func(*JwtOptions)
func WithJwtMaxRefresh ¶
func WithJwtMaxRefresh(maxRefresh int) func(*JwtOptions)
func WithJwtPrivateBytes ¶
func WithJwtPrivateBytes(bs []byte) func(*JwtOptions)
func WithJwtRealm ¶
func WithJwtRealm(realm string) func(*JwtOptions)
func WithJwtSendCookie ¶
func WithJwtSendCookie(flag bool) func(*JwtOptions)
func WithJwtSuccess ¶
func WithJwtSuccess(fun func()) func(*JwtOptions)
func WithJwtTimeout ¶
func WithJwtTimeout(timeout int) func(*JwtOptions)
func WithJwtTokenHeaderName ¶
func WithJwtTokenHeaderName(tokenHeaderName string) func(*JwtOptions)
func WithJwtTokenLookup ¶
func WithJwtTokenLookup(tokenLookup string) func(*JwtOptions)
Types ¶
type CorsOptions ¶
type CorsOptions struct {
// contains filtered or unexported fields
}
type JwtOptions ¶
type JwtOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.