http

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

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) AppDb

func (c *ContextManager) AppDb(AppId int64) *gorm.DB

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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