Documentation
¶
Index ¶
- Constants
- func ConvertHandlers(handlers []HandlerFunc) (ginHandlers []gin.HandlerFunc)
- func ConvertWsHandlers(handlers []HandlerFunc) (ginHandlers []gin.HandlerFunc)
- type CommonContext
- func (c *CommonContext) Accepted() []string
- func (c *CommonContext) AuthClaimID() (ID uint, exist bool)
- func (c *CommonContext) Errors() []*gin.Error
- func (c *CommonContext) GinContext() *gin.Context
- func (c *CommonContext) IUserModel() auth.IUser
- func (c *CommonContext) Keys() map[string]interface{}
- func (c *CommonContext) Params() gin.Params
- func (c *CommonContext) Request() *http.Request
- func (c *CommonContext) SetAuthClaim(claims *jwt.UserClaims)
- func (c *CommonContext) SetIUserModel(iuser auth.IUser)
- func (c *CommonContext) SetRequest(r *http.Request)
- func (c *CommonContext) SetWriter(w gin.ResponseWriter)
- func (c *CommonContext) Writer() gin.ResponseWriter
- type Context
- type Engine
- type HandlerFunc
- type WsContext
- type WsHandlerFunc
Constants ¶
View Source
const CONTEXT_CLAIM_KEY = "TOTOVAL_CONTEXT_CLAIM"
View Source
const CONTEXT_IUSER_KEY = "TOTOVAL_CONTEXT_IUSER"
Variables ¶
This section is empty.
Functions ¶
func ConvertHandlers ¶
func ConvertHandlers(handlers []HandlerFunc) (ginHandlers []gin.HandlerFunc)
func ConvertWsHandlers ¶
func ConvertWsHandlers(handlers []HandlerFunc) (ginHandlers []gin.HandlerFunc)
Types ¶
type CommonContext ¶
func (*CommonContext) Accepted ¶
func (c *CommonContext) Accepted() []string
func (*CommonContext) AuthClaimID ¶
func (c *CommonContext) AuthClaimID() (ID uint, exist bool)
func (*CommonContext) Errors ¶
func (c *CommonContext) Errors() []*gin.Error
func (*CommonContext) GinContext ¶
func (c *CommonContext) GinContext() *gin.Context
func (*CommonContext) IUserModel ¶
func (c *CommonContext) IUserModel() auth.IUser
func (*CommonContext) Keys ¶
func (c *CommonContext) Keys() map[string]interface{}
func (*CommonContext) Params ¶
func (c *CommonContext) Params() gin.Params
func (*CommonContext) Request ¶
func (c *CommonContext) Request() *http.Request
func (*CommonContext) SetAuthClaim ¶
func (c *CommonContext) SetAuthClaim(claims *jwt.UserClaims)
func (*CommonContext) SetIUserModel ¶
func (c *CommonContext) SetIUserModel(iuser auth.IUser)
func (*CommonContext) SetRequest ¶
func (c *CommonContext) SetRequest(r *http.Request)
func (*CommonContext) SetWriter ¶
func (c *CommonContext) SetWriter(w gin.ResponseWriter)
func (*CommonContext) Writer ¶
func (c *CommonContext) Writer() gin.ResponseWriter
type Engine ¶
func (*Engine) Use ¶
func (e *Engine) Use(handlers ...HandlerFunc)
func (*Engine) UseGin ¶
func (e *Engine) UseGin(handlerFunc ...gin.HandlerFunc)
type HandlerFunc ¶
type HandlerFunc func(Context)
type WsHandlerFunc ¶
type WsHandlerFunc func(WsContext)
Click to show internal directories.
Click to hide internal directories.