Documentation
¶
Index ¶
- Variables
- func GetConfig(name string) interface{}
- func GetFormValue(r *http.Request) map[string]interface{}
- func GetSession(req *http.Request, sessionName string) (*sessions.Session, error)
- func Route(path string, ctl interface{})
- func RouteFolder(path string, folder string)
- func Run()
- func SetConfig(name string, value interface{})
- func SetSession(secret string) *sessions.CookieStore
- func Socket(path string, ctl interface{}, checkOrigin bool)
- func Test()
- func Text()
- type ContextHandler
- type Controller
- func (c *Controller) New(mtype string)
- func (c *Controller) Redirect(url string)
- func (c *Controller) RunAction(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ServeHtml(html string)
- func (c *Controller) ServeJson(data interface{})
- func (c *Controller) ServeText(text string)
- func (c *Controller) ServeTpl(tmpls []string, data interface{})
- func (c *Controller) ServeView(view string, data interface{})
- type RouteHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HttpContext = ContextHandler{} Session *sessions.CookieStore = nil )
Functions ¶
func GetFormValue ¶
func RouteFolder ¶
func SetSession ¶
func SetSession(secret string) *sessions.CookieStore
Types ¶
type ContextHandler ¶
type ContextHandler struct {
// contains filtered or unexported fields
}
type Controller ¶
type Controller struct { MsgType string Html string Text string Templates []string Data interface{} }
func (*Controller) New ¶
func (c *Controller) New(mtype string)
func (*Controller) Redirect ¶
func (c *Controller) Redirect(url string)
func (*Controller) RunAction ¶
func (c *Controller) RunAction(w http.ResponseWriter, r *http.Request)
func (*Controller) ServeHtml ¶
func (c *Controller) ServeHtml(html string)
func (*Controller) ServeJson ¶
func (c *Controller) ServeJson(data interface{})
func (*Controller) ServeText ¶
func (c *Controller) ServeText(text string)
func (*Controller) ServeTpl ¶
func (c *Controller) ServeTpl(tmpls []string, data interface{})
func (*Controller) ServeView ¶
func (c *Controller) ServeView(view string, data interface{})
type RouteHandler ¶
type RouteHandler struct { Path string IController interface{} }
Click to show internal directories.
Click to hide internal directories.