Documentation
¶
Index ¶
- Constants
- func ALL(path string, handler Handler)
- func DELETE(path string, handler Handler)
- func GET(path string, handler Handler)
- func HEAD(path string, handler Handler)
- func OPTIONS(path string, handler Handler)
- func PATCH(path string, handler Handler)
- func POST(path string, handler Handler)
- func PUT(path string, handler Handler)
- func Run() error
- func SetAddress(addr string)
- func SetAppName(a string)
- func SetLogPath(lp string)
- func SetNotFoundHandle(nfh NotFoundHandle)
- func SetPanicHandler(ph PanicHandler)
- func SetProxy(p bool)
- func SetViewPath(vp string)
- func StaticFiles(prefix, path string)
- func Use(m Middleware)
- type Context
- func (c *Context) Body(body string)
- func (c *Context) Download(filePath string)
- func (c *Context) GetHeader(key string) string
- func (c *Context) GetHeaders() map[string][]string
- func (c *Context) GetHost() string
- func (c *Context) GetHostname() string
- func (c *Context) GetHref() string
- func (c *Context) GetLength() int
- func (c *Context) GetMethod() string
- func (c *Context) GetOrigin() string
- func (c *Context) GetParam(key string) (value string)
- func (c *Context) GetParamDefault(key, defaultValue string) (value string)
- func (c *Context) GetProtocol() string
- func (c *Context) GetQuery() url.Values
- func (c *Context) GetQuerystring() string
- func (c *Context) GetUri() string
- func (c *Context) GetUserAgent() string
- func (c *Context) IsSecure() bool
- func (c *Context) Json(data map[string]interface{})
- func (c *Context) Parse(object interface{}) error
- func (c *Context) Redirect(url string, code int)
- func (c *Context) Render(tmpFile string, data map[string]interface{})
- func (c *Context) SetHeader(key, value string) *Context
- func (c *Context) SetLength(length int) *Context
- func (c *Context) SetStatus(code int) *Context
- type Handler
- type Middleware
- type Next
- type NotFoundHandle
- type PanicHandler
Constants ¶
View Source
const ( HTTP_METHOD_GET = "GET" HTTP_METHOD_HEAD = "HEAD" HTTP_METHOD_OPTIONS = "OPTIONS" HTTP_METHOD_POST = "POST" HTTP_METHOD_PUT = "PUT" HTTP_METHOD_PATCH = "PATCH" HTTP_METHOD_DELETE = "DELETE" )
Variables ¶
This section is empty.
Functions ¶
func SetAddress ¶ added in v1.0.3
func SetAddress(addr string)
func SetAppName ¶ added in v1.0.3
func SetAppName(a string)
func SetLogPath ¶ added in v1.0.3
func SetLogPath(lp string)
func SetNotFoundHandle ¶ added in v1.0.3
func SetNotFoundHandle(nfh NotFoundHandle)
func SetPanicHandler ¶ added in v1.0.3
func SetPanicHandler(ph PanicHandler)
func SetViewPath ¶ added in v1.0.3
func SetViewPath(vp string)
func StaticFiles ¶ added in v1.0.3
func StaticFiles(prefix, path string)
func Use ¶ added in v1.0.3
func Use(m Middleware)
Types ¶
type Context ¶
func (*Context) GetHeaders ¶
func (*Context) GetHostname ¶
func (*Context) GetParamDefault ¶
func (*Context) GetProtocol ¶
func (*Context) GetQuerystring ¶
func (*Context) GetUserAgent ¶ added in v1.0.2
type Middleware ¶
type NotFoundHandle ¶ added in v1.0.2
type NotFoundHandle func(w http.ResponseWriter, r *http.Request)
func (NotFoundHandle) ServeHTTP ¶ added in v1.0.2
func (f NotFoundHandle) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PanicHandler ¶ added in v1.0.2
type PanicHandler func(http.ResponseWriter, *http.Request, interface{})
Click to show internal directories.
Click to hide internal directories.