Documentation ¶
Index ¶
- func BuildHandle(handler func(ctx *GinContext)) gin.HandlerFunc
- type AuthCookie
- type GinContext
- func (c *GinContext) CookieInt(name string, defaultValue int) int
- func (c *GinContext) CookieInt64(name string, defaultValue int64) int64
- func (c *GinContext) Error(msg string)
- func (c *GinContext) HTML(name string, obj interface{})
- func (c *GinContext) JSON(value interface{})
- func (c *GinContext) Object(obj interface{})
- func (c *GinContext) Ok()
- func (c *GinContext) Pagination(total int, rows interface{})
- func (c *GinContext) PaginationMsg(total int, rows interface{}, msg string)
- func (c *GinContext) PostInt(name string, defaultValue int) int
- func (c *GinContext) PostInt64(name string, defaultValue int64) int64
- func (c *GinContext) QueryInt(name string, defaultValue int) int
- func (c *GinContext) QueryInt64(name string, defaultValue int64) int64
- func (c *GinContext) SetCookie(name, value string)
- type IController
- type WebServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildHandle ¶
func BuildHandle(handler func(ctx *GinContext)) gin.HandlerFunc
包装为,自定义的GinContext
Types ¶
type AuthCookie ¶
func (*AuthCookie) IsValidate ¶
func (a *AuthCookie) IsValidate() bool
func (*AuthCookie) Parse ¶
func (a *AuthCookie) Parse(ctx *GinContext)
type GinContext ¶
type GinContext struct { *gin.Context AuthCookie *AuthCookie }
func (*GinContext) CookieInt64 ¶
func (c *GinContext) CookieInt64(name string, defaultValue int64) int64
func (*GinContext) Error ¶
func (c *GinContext) Error(msg string)
func (*GinContext) HTML ¶
func (c *GinContext) HTML(name string, obj interface{})
func (*GinContext) JSON ¶
func (c *GinContext) JSON(value interface{})
func (*GinContext) Object ¶
func (c *GinContext) Object(obj interface{})
func (*GinContext) Ok ¶
func (c *GinContext) Ok()
func (*GinContext) Pagination ¶
func (c *GinContext) Pagination(total int, rows interface{})
func (*GinContext) PaginationMsg ¶
func (c *GinContext) PaginationMsg(total int, rows interface{}, msg string)
func (*GinContext) PostInt64 ¶
func (c *GinContext) PostInt64(name string, defaultValue int64) int64
func (*GinContext) QueryInt64 ¶
func (c *GinContext) QueryInt64(name string, defaultValue int64) int64
func (*GinContext) SetCookie ¶
func (c *GinContext) SetCookie(name, value string)
type IController ¶
type WebServer ¶
var Web *WebServer
web server instance
func (*WebServer) AddController ¶
func (w *WebServer) AddController(controllers ...IController)
Click to show internal directories.
Click to hide internal directories.