Documentation
¶
Index ¶
- func CacheHtmlTemplates()
- func HttpServer(ch chan int)
- func Route(url string, cb func(Context), authorize bool)
- type Context
- type Controller
- func (m *Controller) Cookie() Cookie
- func (m *Controller) Form() url.Values
- func (m *Controller) GetBody() string
- func (m *Controller) GetFormFile(key string) (multipart.File, *multipart.FileHeader, error)
- func (m *Controller) LoginAuth()
- func (m *Controller) Param(key string) string
- func (m *Controller) PostForm() url.Values
- func (m *Controller) Request() *http.Request
- func (m *Controller) Response() *Response
- func (m *Controller) Result(code int, data interface{}) Result
- func (m *Controller) Session() Session
- func (m *Controller) SetCookie(key, value string)
- func (m *Controller) StateCode(stateCode int)
- func (m *Controller) TplHtml(tplName string) *Html
- type Cookie
- type Html
- type Response
- type Result
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheHtmlTemplates ¶
func CacheHtmlTemplates()
func HttpServer ¶
func HttpServer(ch chan int)
Types ¶
type Context ¶
type Context interface {
StateCode(code int)
Result(code int, data interface{}) Result
Response() *Response
Request() *http.Request
GetBody() string
Param(key string) string
Form() url.Values
PostForm() url.Values
GetFormFile(key string) (multipart.File, *multipart.FileHeader, error)
Cookie() Cookie
Session() Session
LoginAuth()
TplHtml(tplName string) *Html
// contains filtered or unexported methods
}
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) Cookie ¶
func (m *Controller) Cookie() Cookie
func (*Controller) Form ¶
func (m *Controller) Form() url.Values
func (*Controller) GetBody ¶
func (m *Controller) GetBody() string
func (*Controller) GetFormFile ¶
func (m *Controller) GetFormFile(key string) (multipart.File, *multipart.FileHeader, error)
func (*Controller) Param ¶
func (m *Controller) Param(key string) string
func (*Controller) PostForm ¶
func (m *Controller) PostForm() url.Values
func (*Controller) Request ¶
func (m *Controller) Request() *http.Request
func (*Controller) Response ¶
func (m *Controller) Response() *Response
func (*Controller) Result ¶
func (m *Controller) Result(code int, data interface{}) Result
func (*Controller) Session ¶
func (m *Controller) Session() Session
func (*Controller) SetCookie ¶
func (m *Controller) SetCookie(key, value string)
func (*Controller) StateCode ¶
func (m *Controller) StateCode(stateCode int)
func (*Controller) TplHtml ¶
func (m *Controller) TplHtml(tplName string) *Html
Source Files
¶
Click to show internal directories.
Click to hide internal directories.