Documentation ¶
Index ¶
- type Context
- func (c *Context) Data(code int, data []byte)
- func (c *Context) HTML(code int, html string)
- func (c *Context) JSON(code int, obj interface{})
- func (c *Context) Next()
- func (c *Context) Param(key string) string
- func (c *Context) PostForm(key string) string
- func (c *Context) Query(key string) string
- func (c *Context) ServeHTMLFile(filename 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 H
- type HandlerFunc
- type L
- type R
- type RouterGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Writer http.ResponseWriter Req *http.Request Path string Method string Params map[string]string StatusCode int // contains filtered or unexported fields }
func (*Context) ServeHTMLFile ¶
type Engine ¶
type Engine struct { *RouterGroup // contains filtered or unexported fields }
func (*Engine) GET ¶
func (engine *Engine) GET(pattern string, handler HandlerFunc)
func (*Engine) POST ¶
func (engine *Engine) POST(pattern string, handler HandlerFunc)
type HandlerFunc ¶
type HandlerFunc func(*Context)
func AuthenticateMiddleware ¶
func AuthenticateMiddleware() HandlerFunc
func Logger ¶
func Logger() HandlerFunc
func Login ¶
func Login() HandlerFunc
func Signup ¶
func Signup() HandlerFunc
type RouterGroup ¶
type RouterGroup struct {
// contains filtered or unexported fields
}
func (*RouterGroup) GET ¶
func (routergroup *RouterGroup) GET(pattern string, handler HandlerFunc)
func (*RouterGroup) NewRouterGroup ¶
func (routergroup *RouterGroup) NewRouterGroup(prefix string) *RouterGroup
func (*RouterGroup) POST ¶
func (routergroup *RouterGroup) POST(pattern string, handler HandlerFunc)
func (*RouterGroup) RunMiddware ¶
func (routergroup *RouterGroup) RunMiddware(midware ...HandlerFunc)
Click to show internal directories.
Click to hide internal directories.