Documentation ¶
Overview ¶
Copyright (c) 2020 Lau All rights reserved. Use of this source code is governed by MIT License that can be found in the LICENSE file. Author: Lau <lauj@foxmail.com>
Copyright (c) 2020 Lau All rights reserved. Use of this source code is governed by MIT License that can be found in the LICENSE file. Author: Lau <lauj@foxmail.com>
Copyright (c) 2020 Lau All rights reserved. Use of this source code is governed by MIT License that can be found in the LICENSE file. Author: Lau <lauj@foxmail.com>
Copyright (c) 2020 Lau All rights reserved. Use of this source code is governed by MIT License that can be found in the LICENSE file. Author: Lau <lauj@foxmail.com>
Index ¶
- Constants
- func Recovery() handleFunc
- type Context
- func (c *Context) Error(code int, err interface{})
- func (c *Context) FormValue(k string) string
- func (c *Context) Get(k string) interface{}
- func (c *Context) HTML(code int, filename string, obj interface{})
- func (c *Context) JSON(code int, obj interface{})
- func (c *Context) Next()
- func (c *Context) Param(k string) string
- func (c *Context) PostFormValue(k string) string
- func (c *Context) Set(k string, v interface{})
- func (c *Context) SetHeader(k, v string)
- func (c *Context) SetStatus(code int)
- func (c *Context) String(code int, format string, val string)
- type Engine
- type H
- type Route
Constants ¶
const ( NODEDEFAULT uint8 = iota // normal string NODEPARAM // bind param NODEWILDCARD // wildcard )
node type
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context struct { W http.ResponseWriter R *http.Request Method string Path string Code int *Engine Params map[string]string // contains filtered or unexported fields }
func NewContext ¶
func NewContext(w http.ResponseWriter, r *http.Request) *Context
func (*Context) PostFormValue ¶
type Engine ¶
func (*Engine) LoadHTMLFiles ¶
ParseFiles from the named files
func (*Engine) LoadHTMLGlob ¶
ParseFiles with the list of files matched by the pattern