Documentation ¶
Index ¶
- func Delete(route string, handler interface{})
- func Get(route string, handler interface{})
- func Post(route string, handler interface{})
- func Put(route string, handler interface{})
- func Run(addr string)
- func RunFcgi(addr string)
- func RunScgi(addr string)
- func SetCookieSecret(key string)
- func SetStaticDir(dir string) os.Error
- func Urlencode(data map[string]string) string
- type Context
- func (ctx *Context) Abort(status int, body string)
- func (ctx *Context) GetSecureCookie(name string) (string, bool)
- func (ctx *Context) NotFound(message string)
- func (ctx *Context) Redirect(status int, url string)
- func (ctx *Context) SetCookie(name string, value string, age int64)
- func (ctx *Context) SetSecureCookie(name string, val string, age int64)
- func (ctx *Context) StartResponse(status int)
- func (ctx *Context) Write(data []byte) (n int, err os.Error)
- func (ctx *Context) WriteString(content string)
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(route string, handler interface{})
Adds a handler for the 'DELETE' http method.
func SetCookieSecret ¶
func SetCookieSecret(key string)
func SetStaticDir ¶
changes the location of the static directory. by default, it's under the 'static' folder of the directory containing the web application
Types ¶
type Context ¶
type Context struct { *Request // contains filtered or unexported fields }
func (*Context) SetSecureCookie ¶
func (*Context) StartResponse ¶
func (*Context) WriteString ¶
type Request ¶
type Request struct { Method string // GET, POST, PUT, etc. RawURL string // The raw URL given in the request. URL *http.URL // Parsed URL. Proto string // "HTTP/1.0" ProtoMajor int // 1 ProtoMinor int // 0 Headers map[string]string Body io.Reader Close bool Host string Referer string UserAgent string Params map[string][]string Cookies map[string]string Files map[string]filedata }
Click to show internal directories.
Click to hide internal directories.