Documentation ¶
Index ¶
- type Context
- func (c *Context) Abort(handlerFunc HandlerFunc)
- func (c *Context) Data(code int, data []byte)
- func (c *Context) HTML(code int, html string)
- func (c *Context) JSON(code int, obj interface{})
- func (c *Context) Next()
- func (c *Context) Param(key string) string
- func (c *Context) PostForm(key string) string
- func (c *Context) Query(key string) string
- func (c *Context) SetHeader(key string, value string)
- func (c *Context) Status(code int)
- func (c *Context) String(code int, format string, values ...interface{})
- type H
- type HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { // origin objects Writer http.ResponseWriter Req *http.Request // request info Path string Method string // response info StatusCode int Params map[string]string // middleware Handlers []HandlerFunc // contains filtered or unexported fields }
func NewContext ¶
func NewContext(w http.ResponseWriter, req *http.Request) *Context
func (*Context) Abort ¶
func (c *Context) Abort(handlerFunc HandlerFunc)
type HandlerFunc ¶
type HandlerFunc func(ctx *Context)
HandlerFunc defines the request handler used by gee
Click to show internal directories.
Click to hide internal directories.