Documentation
¶
Index ¶
- func IsDebug() bool
- type Context
- func (c *Context) Abort()
- func (c *Context) AbortWithStatus(code int)
- func (c *Context) Data(code int, data []byte)
- func (c *Context) DeleteHeader(key string)
- func (c *Context) Fail(code int, err string)
- func (c *Context) GetHeader(key string) string
- 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 Engine
- type H
- type HandlerFunc
- type RouterGroup
- func (group *RouterGroup) Any(pattern string, handler HandlerFunc)
- func (group *RouterGroup) DELETE(pattern string, handler HandlerFunc)
- func (group *RouterGroup) GET(pattern string, handler HandlerFunc)
- func (group *RouterGroup) Group(prefix string) *RouterGroup
- func (group *RouterGroup) HEAD(pattern string, handler HandlerFunc)
- func (group *RouterGroup) OPTIONS(pattern string, handler HandlerFunc)
- func (group *RouterGroup) PATCH(pattern string, handler HandlerFunc)
- func (group *RouterGroup) POST(pattern string, handler HandlerFunc)
- func (group *RouterGroup) PUT(pattern string, handler HandlerFunc)
- func (group *RouterGroup) Use(middlewares ...HandlerFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { Writer http.ResponseWriter Request *http.Request Path string Method string Params map[string]string StatusCode int // contains filtered or unexported fields }
func NewContext ¶
func NewContext(w http.ResponseWriter, req *http.Request) *Context
func (*Context) AbortWithStatus ¶ added in v0.0.2
func (*Context) DeleteHeader ¶ added in v0.0.2
type Engine ¶
type Engine struct { *RouterGroup // contains filtered or unexported fields }
type HandlerFunc ¶
type HandlerFunc func(ctx *Context)
func Logger ¶
func Logger() HandlerFunc
func Recovery ¶
func Recovery() HandlerFunc
func Server ¶
func Server() HandlerFunc
type RouterGroup ¶
type RouterGroup struct {
// contains filtered or unexported fields
}
func (*RouterGroup) Any ¶ added in v0.0.2
func (group *RouterGroup) Any(pattern string, handler HandlerFunc)
func (*RouterGroup) DELETE ¶
func (group *RouterGroup) DELETE(pattern string, handler HandlerFunc)
func (*RouterGroup) GET ¶
func (group *RouterGroup) GET(pattern string, handler HandlerFunc)
func (*RouterGroup) Group ¶
func (group *RouterGroup) Group(prefix string) *RouterGroup
func (*RouterGroup) HEAD ¶
func (group *RouterGroup) HEAD(pattern string, handler HandlerFunc)
func (*RouterGroup) OPTIONS ¶
func (group *RouterGroup) OPTIONS(pattern string, handler HandlerFunc)
func (*RouterGroup) PATCH ¶
func (group *RouterGroup) PATCH(pattern string, handler HandlerFunc)
func (*RouterGroup) POST ¶
func (group *RouterGroup) POST(pattern string, handler HandlerFunc)
func (*RouterGroup) PUT ¶
func (group *RouterGroup) PUT(pattern string, handler HandlerFunc)
func (*RouterGroup) Use ¶
func (group *RouterGroup) Use(middlewares ...HandlerFunc)
Click to show internal directories.
Click to hide internal directories.