Documentation ¶
Index ¶
- func Bytes2String(bs []uint8) string
- func GetGoroutineID() uint64
- func GetIPAddr() string
- func GetMD5ID(b []byte) string
- type Application
- func (app *Application) Delete(path string, cbFunc ...Handler) error
- func (app *Application) Get(path string, cbFunc ...Handler) error
- func (app *Application) Head(path string, cbFunc ...Handler) error
- func (app *Application) Options(path string, cbFunc ...Handler) error
- func (app *Application) Patch(path string, cbFunc ...Handler) error
- func (app *Application) Post(path string, cbFunc ...Handler) error
- func (app *Application) Put(path string, cbFunc ...Handler) error
- func (app *Application) Run(port int) error
- func (app *Application) RunTLS(port int, certFile string, keyFile string) error
- func (app *Application) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (app *Application) Use(argus ...interface{})
- type Context
- func (ctx *Context) GetCookie(key string) *http.Cookie
- func (ctx *Context) GetData(key string) interface{}
- func (ctx *Context) GetHeader(key string) []string
- func (ctx *Context) GetSession() map[string]interface{}
- func (ctx *Context) IsFinished() bool
- func (ctx *Context) SetCookie(cookie *http.Cookie)
- func (ctx *Context) SetData(key string, value interface{})
- func (ctx *Context) SetHeader(key string, value string)
- func (ctx *Context) SetSession(key string, value interface{})
- func (ctx *Context) UpdateSession(sess map[string]interface{})
- func (ctx *Context) Write(data []byte) (int, error)
- type Handler
- type MiddlewareHandler
- type NextCb
- type RouterHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application Object
func (*Application) Delete ¶
func (app *Application) Delete(path string, cbFunc ...Handler) error
Delete func
func (*Application) Get ¶
func (app *Application) Get(path string, cbFunc ...Handler) error
Get func
func (*Application) Head ¶
func (app *Application) Head(path string, cbFunc ...Handler) error
Head func
func (*Application) Options ¶
func (app *Application) Options(path string, cbFunc ...Handler) error
Options func
func (*Application) Patch ¶
func (app *Application) Patch(path string, cbFunc ...Handler) error
Patch func
func (*Application) Post ¶
func (app *Application) Post(path string, cbFunc ...Handler) error
Post func
func (*Application) Put ¶
func (app *Application) Put(path string, cbFunc ...Handler) error
Put func
func (*Application) RunTLS ¶
func (app *Application) RunTLS(port int, certFile string, keyFile string) error
RunTLS func
func (*Application) ServeHTTP ¶
func (app *Application) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP interface func
type Context ¶
type Context struct { Header map[string]([]string) Res http.ResponseWriter Req *http.Request URL string Path string Method string Status int MatchURL string Body []uint8 Query map[string]([]string) Params map[string](string) IsFinish bool // contains filtered or unexported fields }
Context Request
func (*Context) GetSession ¶
GetSession func
func (*Context) SetSession ¶
SetSession func
func (*Context) UpdateSession ¶
UpdateSession func
type MiddlewareHandler ¶
type MiddlewareHandler struct {
// contains filtered or unexported fields
}
MiddlewareHandler struct
type RouterHandler ¶
type RouterHandler struct {
// contains filtered or unexported fields
}
RouterHandler struct
Click to show internal directories.
Click to hide internal directories.