request

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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)

Types

type Context

type Context struct {
	*gin.Context
}

func (*Context) AuthClaimID

func (c *Context) AuthClaimID() (ID uint, exist bool)

func (*Context) IUserModel added in v0.9.3

func (c *Context) IUserModel() auth.IUser

func (*Context) SetAuthClaim

func (c *Context) SetAuthClaim(claims *jwt.UserClaims)

func (*Context) SetIUserModel added in v0.9.3

func (c *Context) SetIUserModel(iuser auth.IUser)

type Engine

type Engine struct {
	*gin.Engine
}

func New

func New() *Engine

func (*Engine) GinEngine

func (e *Engine) GinEngine() *gin.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)

Jump to

Keyboard shortcuts

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