Documentation ¶
Index ¶
- Constants
- type App
- func (app *App) Config() *Config
- func (app *App) Delete(key string, fn ...Handler)
- func (app *App) Get(key string, fn ...Handler) string
- func (app *App) NotFound(h Handler)
- func (app *App) Post(key string, fn ...Handler)
- func (app *App) Put(key string, fn ...Handler)
- func (app *App) Recover(h Handler)
- func (app *App) Route(method string, key string, fn ...Handler)
- func (app *App) Run()
- func (app *App) ServeHTTP(res http.ResponseWriter, req *http.Request)
- func (app *App) Set(key string, v interface{})
- func (app *App) Static(h Handler)
- func (app *App) Use(h ...Handler)
- func (app *App) View() *View
- type Config
- func (cfg *Config) Bool(key string) bool
- func (cfg *Config) Float(key string) float64
- func (cfg *Config) FloatOr(key string, def float64) float64
- func (cfg *Config) Int(key string) int
- func (cfg *Config) IntOr(key string, def int) int
- func (cfg *Config) Set(key string, value interface{})
- func (cfg *Config) String(key string) string
- func (cfg *Config) StringOr(key string, def string) string
- type Context
- func (ctx *Context) App() *App
- func (ctx *Context) Bool(key string) bool
- func (ctx *Context) ContentType(contentType string)
- func (ctx *Context) Cookie(key string, value ...string) string
- func (ctx *Context) Do(e string, args ...interface{}) [][]interface{}
- func (ctx *Context) Download(file string)
- func (ctx *Context) End()
- func (ctx *Context) Flash(key string, v ...interface{}) interface{}
- func (ctx *Context) Float(key string) float64
- func (ctx *Context) FloatOr(key string, def float64) float64
- func (ctx *Context) Func(name string, fn interface{})
- func (ctx *Context) GetHeader(key string) string
- func (ctx *Context) Input() map[string]string
- func (ctx *Context) Int(key string) int
- func (ctx *Context) IntOr(key string, def int) int
- func (ctx *Context) Json(data interface{})
- func (ctx *Context) Layout(str string)
- func (ctx *Context) On(e string, fn interface{})
- func (ctx *Context) Param(key string) string
- func (ctx *Context) Redirect(url string, status ...int)
- func (ctx *Context) Render(tpl string, data map[string]interface{})
- func (ctx *Context) Send()
- func (ctx *Context) String(key string) string
- func (ctx *Context) StringOr(key string, def string) string
- func (ctx *Context) Strings(key string) []string
- func (ctx *Context) Throw(status int, message ...interface{})
- func (ctx *Context) Tpl(tpl string, data map[string]interface{}) string
- type Handler
- type Route
- type Router
- func (rt *Router) Delete(pattern string, fn ...Handler)
- func (rt *Router) Find(url string, method string) (params map[string]string, fn []Handler)
- func (rt *Router) Get(pattern string, fn ...Handler)
- func (rt *Router) Post(pattern string, fn ...Handler)
- func (rt *Router) Put(pattern string, fn ...Handler)
- type View
Constants ¶
View Source
const ( ROUTER_METHOD_GET = "GET" ROUTER_METHOD_POST = "POST" ROUTER_METHOD_PUT = "PUT" ROUTER_METHOD_DELETE = "DELETE" )
--------------------------Router----------------------
View Source
const ( CONTEXT_RENDERED = "context_rendered" CONTEXT_END = "context_end" CONTEXT_SEND = "context_send" )
-----------------------Context------------------------
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
---------------------------App------------------------
type Context ¶
type Context struct { Request *http.Request Base string Url string RequestUrl string Method string Ip string UserAgent string Referer string Host string Ext string IsSSL bool IsAjax bool Response http.ResponseWriter Status int Header map[string]string Body []byte IsSend bool IsEnd bool // contains filtered or unexported fields }
func NewContext ¶
func (*Context) ContentType ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.