Documentation
¶
Index ¶
- Constants
- type ContextManager
- func (c *ContextManager) Accepted() []string
- func (c *ContextManager) AppDb(AppId int64) *gorm.DB
- func (c *ContextManager) AuthClaimID() (ID int64, exist bool)
- func (c *ContextManager) ContextDb() *gorm.DB
- func (c *ContextManager) Errors() []*gin.Error
- func (c *ContextManager) GinContext() *gin.Context
- func (c *ContextManager) IUserModel() auth.IUser
- func (c *ContextManager) Keys() map[string]interface{}
- func (c *ContextManager) Params() gin.Params
- func (c *ContextManager) Request() *http.Request
- func (c *ContextManager) ScanUserWithJSON() (isAbort bool)
- func (c *ContextManager) SetAuthClaim(claims *jwt.UserClaims)
- func (c *ContextManager) SetIUserModel(iuser auth.IUser)
- func (c *ContextManager) SetRequest(r *http.Request)
- func (c *ContextManager) SetWriter(w gin.ResponseWriter)
- func (c *ContextManager) Writer() gin.ResponseWriter
Constants ¶
View Source
const ContextClaimKey = "TMAIC_CONTEXT_CLAIM"
View Source
const ContextIuserModelKey = "TMAIC_CONTEXT_IUSER_MODEL"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextManager ¶
type ContextManager struct { *gin.Context *auth.RequestUser }
func ConvertContext ¶
func ConvertContext(c *gin.Context) *ContextManager
func (*ContextManager) Accepted ¶
func (c *ContextManager) Accepted() []string
func (*ContextManager) AuthClaimID ¶
func (c *ContextManager) AuthClaimID() (ID int64, exist bool)
func (*ContextManager) ContextDb ¶
func (c *ContextManager) ContextDb() *gorm.DB
func (*ContextManager) Errors ¶
func (c *ContextManager) Errors() []*gin.Error
func (*ContextManager) GinContext ¶
func (c *ContextManager) GinContext() *gin.Context
func (*ContextManager) IUserModel ¶
func (c *ContextManager) IUserModel() auth.IUser
func (*ContextManager) Keys ¶
func (c *ContextManager) Keys() map[string]interface{}
func (*ContextManager) Params ¶
func (c *ContextManager) Params() gin.Params
func (*ContextManager) Request ¶
func (c *ContextManager) Request() *http.Request
func (*ContextManager) ScanUserWithJSON ¶
func (c *ContextManager) ScanUserWithJSON() (isAbort bool)
func (*ContextManager) SetAuthClaim ¶
func (c *ContextManager) SetAuthClaim(claims *jwt.UserClaims)
func (*ContextManager) SetIUserModel ¶
func (c *ContextManager) SetIUserModel(iuser auth.IUser)
func (*ContextManager) SetRequest ¶
func (c *ContextManager) SetRequest(r *http.Request)
func (*ContextManager) SetWriter ¶
func (c *ContextManager) SetWriter(w gin.ResponseWriter)
func (*ContextManager) Writer ¶
func (c *ContextManager) Writer() gin.ResponseWriter
Click to show internal directories.
Click to hide internal directories.