Versions in this module Expand all Collapse all v1 v1.6.0 May 13, 2016 Changes in this version + const EvtBootProvider + const EvtConfigProvider + const EvtRegisterMiddle + const EvtRegisterRoute + const EvtRegisterService + const LsnServer + const SessionContainerKey + const SvcApp + const SvcI18nFilter + const SvcMemorySession + const SvcPermanentSession + const SvcSessionContainer + var Cfg = config.NewConfig(DirConfig) + var CfgApp = &struct{ ... } + var DirBase = getBaseDir() + var DirBundle = filepath.Join(DirBase, "bundle") + var DirCache = filepath.Join(DirBase, "cache") + var DirConfig = filepath.Join(DirBase, "config") + var DirStaticFile = filepath.Join(DirBase, "public") + var Emer = func(e error) + var Emerf = func(format string, args ...interface{}) + var Err = func(e error) + var Errf = func(format string, args ...interface{}) + var Key string + var Warn = func(e error) + var Warnf = func(format string, args ...interface{}) + func CoverError(w http.ResponseWriter, r *http.Request, call func()) + func GetIp(r *http.Request) string + func Redirect(url string) + func RedirectCode(url string, code int) + func Return() + func SendEmail(to string, title, body string) error + type App struct + Action string + Container *service.Container + Params router.Param + Request *http.Request + Response http.ResponseWriter + VContainer *view.Container + func (app *App) AddCache(name string, service interface{}) + func (app *App) Danger(msg string) + func (app *App) FilterI18n(msg string) (i18nMsg string) + func (app *App) Flash() + func (app *App) Form() url.Values + func (app *App) FormFile(key string) (multipart.File, *multipart.FileHeader, error) + func (app *App) Get(service string) interface{} + func (app *App) GetCache(service string) interface{} + func (app *App) GetNew(service string) interface{} + func (app *App) Info(msg string) + func (app *App) IsGet() bool + func (app *App) IsPost() bool + func (app *App) JsonEncode(data interface{}) + func (app *App) PSession() PSession + func (app *App) Query() url.Values + func (app *App) Redirect(url string) + func (app *App) Return() + func (app *App) Session() Session + func (app *App) SessionContainer() *service.Container + func (app *App) SetCookie(key, value string, maxAge int) + func (app *App) Success(msg string) + func (app *App) View(file ...string) *App + func (app *App) Warning(msg string) + func (app *App) With(name string, data interface{}) + func (app *App) WriteString(str string) + type BaseRegister struct + func (*BaseRegister) Boot(c *service.Container) + func (*BaseRegister) RegisterMiddle(c *middle.Container) + func (*BaseRegister) RegisterRoute(c *router.Container) + func (*BaseRegister) RegisterService(c *service.Container) + type CloseAble interface + Close func() + type FileHandler interface + HandleFile func(*http.Request) bool + ServeFile func(w http.ResponseWriter, r *http.Request, fileName string) + type I18nFilter interface + FilterMsg func(src string) (dst string) + ViewSubDir func() (dir string) + type MiddlewareConfigure interface + SetMiddle func(bag *middle.Bag) + type NotFoundHandler interface + NotFound func(w http.ResponseWriter, r *http.Request) + type PSession interface + Del func(key string) + Flash func(key string) (value string) + Get func(key string) (value string) + ID func() string + Set func(key, value string) + type Register interface + Boot func(c *service.Container) + RegisterMiddle func(c *middle.Container) + RegisterRoute func(c *router.Container) + RegisterService func(c *service.Container) + type RegisterListener interface + BootProvider func(s *Server) + ConfigServer func(s *Server) + RegisterMiddle func(s *Server) + RegisterRoute func(s *Server) + RegisterService func(s *Server) + type RequestHandler interface + Handle func(app *App) + type RouteFilter struct + func NewRouteFilter() *RouteFilter + func (f *RouteFilter) AddActions(actions []string) + func (f *RouteFilter) AddStructs(structs []interface{}) + func (f *RouteFilter) FilterAction(action string) bool + type Server struct + Dispatcher *event.Dispatcher + MContainer *middle.Container + MiddleBag *middle.Bag + RContainer *router.Container + Registers []Register + SContainer *service.Container + VContainer *view.Container + func NewServer(addr string) *Server + func (s *Server) AddServerListener(ls ...event.Listener) + func (s *Server) Close() + func (s *Server) HandleFile(r *http.Request) bool + func (s *Server) NotFound(w http.ResponseWriter, r *http.Request) + func (s *Server) PrintMsg() + func (s *Server) RegisterBundle(app ...Register) + func (s *Server) Run() + func (s *Server) ServeFile(w http.ResponseWriter, r *http.Request, name string) + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Server) SetFileHandler(h FileHandler) + func (s *Server) SetNotFoundHandler(h NotFoundHandler) + type ServerEventListener interface + AddServerListener func(d *event.Dispatcher) + type ServerListener struct + func (this *ServerListener) BootProvider(server *Server) + func (this *ServerListener) ConfigServer(s *Server) + func (this *ServerListener) GetSubscribe() (name string, subscribes []event.Subscribe) + func (this *ServerListener) RegisterMiddle(server *Server) + func (this *ServerListener) RegisterRoute(server *Server) + func (this *ServerListener) RegisterService(server *Server) + type Session interface + Del func(key string) + DelData func(key string) + Flash func(key string) (value string) + FlashData func(key string) (data interface{}) + Get func(key string) (value string) + GetData func(key string) interface{} + ID func() string + Set func(key, value string) + SetData func(key string, data interface{}) + type TerminateHandler interface + Terminate func(app *App)