Documentation ¶
Index ¶
- Constants
- Variables
- type Application
- func (a *Application) BindRuntime(abs interface{}, instance interface{}, singleton bool)
- func (a *Application) BindRuntimeFunc(abs interface{}, register container.InstanceRegister, singleton bool)
- func (a *Application) Bootstrap()
- func (a *Application) ConfigRuntime(h RuntimeHolder)
- func (a *Application) Configure(name string, to interface{}) error
- func (a *Application) Debug() bool
- func (a *Application) Defer(cb Cb)
- func (a *Application) Env() string
- func (a *Application) GetBasePath() string
- func (a *Application) GetConfigPath() string
- func (a *Application) NewRuntime() *Application
- func (a *Application) RegisterController(name string, controller interface{})
- func (a *Application) RegisterServiceProvider(provider ServiceProvider)
- func (a *Application) RunDefers()
- func (a *Application) RuntimeRegisters() []*RuntimeRegisters
- func (a *Application) Terminate()
- func (a *Application) TerminateWith(f Cb)
- type Cb
- type RuntimeHolder
- type RuntimeRegisters
- type ServiceProvider
Constants ¶
View Source
const Version = "0.0.1"
Variables ¶
View Source
var ( Timezone string TimezoneSet bool )
Functions ¶
This section is empty.
Types ¶
type Application ¶
func (*Application) BindRuntime ¶
func (a *Application) BindRuntime(abs interface{}, instance interface{}, singleton bool)
BindRuntime bind request lift time object to container object can be injection to route handler
func (*Application) BindRuntimeFunc ¶
func (a *Application) BindRuntimeFunc(abs interface{}, register container.InstanceRegister, singleton bool)
func (*Application) Bootstrap ¶
func (a *Application) Bootstrap()
func (*Application) ConfigRuntime ¶ added in v0.0.2
func (a *Application) ConfigRuntime(h RuntimeHolder)
ConfigRuntime handle runtime app before its returns
func (*Application) Configure ¶
func (a *Application) Configure(name string, to interface{}) error
func (*Application) Debug ¶
func (a *Application) Debug() bool
func (*Application) Defer ¶
func (a *Application) Defer(cb Cb)
/ Defer run your function before server down
func (*Application) Env ¶
func (a *Application) Env() string
func (*Application) GetBasePath ¶
func (a *Application) GetBasePath() string
func (*Application) GetConfigPath ¶
func (a *Application) GetConfigPath() string
func (*Application) NewRuntime ¶
func (a *Application) NewRuntime() *Application
func (*Application) RegisterController ¶
func (a *Application) RegisterController(name string, controller interface{})
func (*Application) RegisterServiceProvider ¶
func (a *Application) RegisterServiceProvider(provider ServiceProvider)
func (*Application) RunDefers ¶
func (a *Application) RunDefers()
func (*Application) RuntimeRegisters ¶
func (a *Application) RuntimeRegisters() []*RuntimeRegisters
func (*Application) Terminate ¶
func (a *Application) Terminate()
func (*Application) TerminateWith ¶
func (a *Application) TerminateWith(f Cb)
TerminateWith run your function at end of request life time
type RuntimeHolder ¶ added in v0.0.2
type RuntimeHolder func(runtime *Application)
type RuntimeRegisters ¶
type RuntimeRegisters struct {
// contains filtered or unexported fields
}
func (*RuntimeRegisters) Abs ¶
func (r *RuntimeRegisters) Abs() interface{}
func (*RuntimeRegisters) Instance ¶
func (r *RuntimeRegisters) Instance() interface{}
func (*RuntimeRegisters) Singleton ¶
func (r *RuntimeRegisters) Singleton() bool
type ServiceProvider ¶
type ServiceProvider interface { // Register your service provider when app starting // Register(app *Application) // Boot your service provider when app started // Boot(app *Application) }
Click to show internal directories.
Click to hide internal directories.