Documentation ¶
Index ¶
Constants ¶
View Source
const ( OnBeforeBoot = "app.boot.before" OnAfterBoot = "app.boot.after" OnBeforeConfig = "app.config.before" OnAfterConfig = "app.config.after" OnBeforeConsole = "app.console.before" OnAfterConsole = "app.console.after" OnBeforeRoute = "app.route.before" OnAfterRoute = "app.route.after" )
Some app event names
View Source
const ( ModeDev mode = "dev" ModeTest mode = "test" ModeProd mode = "prod" )
Variables ¶
View Source
var ( Debug = false Mode = ModeDev )
Functions ¶
Types ¶
type Application ¶
type Application struct { *event.Manager Name string BootLoaders []BootLoader // components View *view.Renderer Cache cache.Cache Config *config.Config Router *rux.Router Logger *llog.Logger // contains filtered or unexported fields }
Application instance
func (*Application) Get ¶
func (a *Application) Get(name string) interface{}
Get value from app.data
func (*Application) Set ¶
func (a *Application) Set(name string, val interface{})
Set value to app.data
type BootLoader ¶
type BootLoader interface { // Boot do something before application run Boot(app *Application) error }
BootLoader for app start boot
Click to show internal directories.
Click to hide internal directories.