Documentation
¶
Index ¶
- func JsonError(ctx *Context, data interface{}, err error)
- func JsonResult(ctx *Context, data interface{})
- func SetMode(mode string)
- type Context
- type Engine
- type Handle
- type InitFunc
- type Middleware
- type RouteGroup
- func (r *RouteGroup) GET(path, name string, h Handle)
- func (g *RouteGroup) Group(path string) *RouteGroup
- func (r *RouteGroup) Init(b InitFunc) *RouteGroup
- func (r *RouteGroup) POST(path, name string, h Handle)
- func (r *RouteGroup) Static(path, dir string)
- func (r *RouteGroup) StaticFs(path string, fs http.FileSystem)
- func (r *RouteGroup) Use(middleware ...Middleware) *RouteGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JsonResult ¶
func JsonResult(ctx *Context, data interface{})
Types ¶
type Engine ¶
type Engine struct {
*RouteGroup
// contains filtered or unexported fields
}
func NewDefaultEngine ¶
func NewDefaultEngine() *Engine
func (*Engine) LoadHTMLFiles ¶
func (*Engine) LoadHTMLGlob ¶
type Middleware ¶
type RouteGroup ¶
type RouteGroup struct {
Path string
// contains filtered or unexported fields
}
func (*RouteGroup) GET ¶
func (r *RouteGroup) GET(path, name string, h Handle)
func (*RouteGroup) Group ¶
func (g *RouteGroup) Group(path string) *RouteGroup
func (*RouteGroup) Init ¶
func (r *RouteGroup) Init(b InitFunc) *RouteGroup
func (*RouteGroup) POST ¶
func (r *RouteGroup) POST(path, name string, h Handle)
func (*RouteGroup) Static ¶
func (r *RouteGroup) Static(path, dir string)
func (*RouteGroup) StaticFs ¶
func (r *RouteGroup) StaticFs(path string, fs http.FileSystem)
func (*RouteGroup) Use ¶
func (r *RouteGroup) Use(middleware ...Middleware) *RouteGroup
Click to show internal directories.
Click to hide internal directories.