Documentation ¶
Index ¶
- func Contexter() macaron.Handler
- type Context
- func (c *Context) AccessDenied()
- func (c *Context) BadRequest(msg string)
- func (c *Context) BadRequestByCode(code int, msg string)
- func (c *Context) BadRequestByError(err error)
- func (c *Context) Error(err error)
- func (c *Context) InternalServerError()
- func (c *Context) JSON(i interface{})
- func (c *Context) JSONAuth(msg string)
- func (c *Context) JSONByCode(code int, i interface{})
- func (c *Context) JSONEmpty()
- func (c *Context) JSONList(count int64, listName string, list interface{})
- func (c *Context) NotFound()
- func (c *Context) ParamsID(name string) common.ID
- func (c *Context) QueryID(name string) common.ID
- func (c *Context) Redirect(url string)
- type JSONResult
- type SessionUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { *macaron.Context *SessionUser StartTime time.Time IP string Secret string Expire int64 }
Context .
func (*Context) BadRequestByCode ¶
BadRequestByCode .
func (*Context) BadRequestByError ¶
BadRequestByError .
type JSONResult ¶
type JSONResult struct { Code int `json:"code"` Msg string `json:"msg,omitempty"` Data interface{} `json:"data,omitempty"` } //@name Result
JSONResult .
Click to show internal directories.
Click to hide internal directories.