Documentation ¶
Index ¶
- func Debug(format string, v ...interface{})
- type Context
- func (c *Context) Cookie(key string) (string, error)
- func (c *Context) Data(code int, contentType string, data []byte)
- func (c *Context) Get(key string) string
- func (c *Context) Html(code int, name string, v interface{})
- func (c *Context) Json(code int, v interface{})
- func (c *Context) Jsonp(code int, v interface{})
- func (c *Context) Param(key string) string
- func (c *Context) Post(key string) string
- func (c *Context) Render(code int, r Render)
- func (c *Context) SetHeader(key string, value string)
- func (c *Context) Status(code int)
- func (c *Context) String(code int, format string, v ...interface{})
- func (c *Context) Xml(code int, v interface{})
- func (c *Context) Yaml(code int, v interface{})
- type Data
- type Engine
- func (e *Engine) HandleNotFound(c *Context, middleware []Middleware)
- func (e *Engine) LoadHtmlGlob(pattern string)
- func (e *Engine) Run(address string) (err error)
- func (e *Engine) RunTLS(address, cert, key string) (err error)
- func (e *Engine) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (e *Engine) SetFuncMap(funcMap template.FuncMap)
- type H
- type Handler
- type Html
- type Json
- type Jsonp
- type Middleware
- type Node
- type Parameter
- type Render
- type Router
- func (r *Router) Any(pattern string, handler Handler)
- func (r *Router) Delete(pattern string, handler Handler)
- func (r *Router) Get(pattern string, handler Handler)
- func (r *Router) Group(prefix string) *Router
- func (r *Router) Handle(method string, pattern string, handler Handler)
- func (r *Router) Head(pattern string, handler Handler)
- func (r *Router) Options(pattern string, handler Handler)
- func (r *Router) Patch(pattern string, handler Handler)
- func (r *Router) Post(pattern string, handler Handler)
- func (r *Router) Put(pattern string, handler Handler)
- func (r *Router) Static(pattern, root string)
- func (r *Router) Use(middleware ...Middleware)
- type String
- type Tree
- type Xml
- type Yaml
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { Writer http.ResponseWriter Request *http.Request Uri string Method string Parameters map[string]string StatusCode int // contains filtered or unexported fields }
func NewContext ¶
func NewContext(w http.ResponseWriter, r *http.Request) *Context
type Engine ¶
type Engine struct { Router Template *template.Template FuncMap template.FuncMap // contains filtered or unexported fields }
func (*Engine) HandleNotFound ¶
func (e *Engine) HandleNotFound(c *Context, middleware []Middleware)
func (*Engine) LoadHtmlGlob ¶
func (*Engine) SetFuncMap ¶
type Middleware ¶
type Render ¶
type Render interface {
Render(http.ResponseWriter) error
}
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) Use ¶
func (r *Router) Use(middleware ...Middleware)
Click to show internal directories.
Click to hide internal directories.