Documentation
¶
Index ¶
- type Context
- func (c *Context) Data(code int, data []byte)
- func (c *Context) Fail(code int, err string)
- func (c *Context) HTML(code int, html string)
- func (c *Context) JSON(code int, obj interface{})
- func (c *Context) Next()
- 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 GroupRoute
- func (group *GroupRoute) GET(pattern string, handler HandlerFunc)
- func (group *GroupRoute) Group(prefix string) *GroupRoute
- func (group *GroupRoute) POST(pattern string, handler HandlerFunc)
- func (group *GroupRoute) Static(relativePath string, root string)
- func (group *GroupRoute) USE(middlewares ...HandlerFunc)
- type H
- type HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Engine ¶
type Engine struct { *GroupRoute // contains filtered or unexported fields }
func (*Engine) GET ¶ added in v0.0.9
func (engine *Engine) GET(pattern string, handler HandlerFunc)
func (*Engine) POST ¶
func (engine *Engine) POST(pattern string, handler HandlerFunc)
type GroupRoute ¶ added in v0.0.9
type GroupRoute struct {
// contains filtered or unexported fields
}
func (*GroupRoute) GET ¶ added in v0.0.9
func (group *GroupRoute) GET(pattern string, handler HandlerFunc)
GET defines the method to add GET request
func (*GroupRoute) Group ¶ added in v0.0.9
func (group *GroupRoute) Group(prefix string) *GroupRoute
func (*GroupRoute) POST ¶ added in v0.0.9
func (group *GroupRoute) POST(pattern string, handler HandlerFunc)
POST defines the method to add POST request
func (*GroupRoute) Static ¶ added in v0.0.9
func (group *GroupRoute) Static(relativePath string, root string)
serve static files
func (*GroupRoute) USE ¶ added in v0.0.9
func (group *GroupRoute) USE(middlewares ...HandlerFunc)
type HandlerFunc ¶
type HandlerFunc func(*Context)
func Logger ¶ added in v0.0.9
func Logger() HandlerFunc
func Recovery ¶ added in v0.0.9
func Recovery() HandlerFunc
Click to show internal directories.
Click to hide internal directories.