Documentation ¶
Index ¶
- func Error(params ...interface{}) error
- func GetEnv(key string) string
- func New() contract.Application
- func NewCommand(option *CommandOption) contract.BaseCommand
- func Recover(logger contract.Loggable, params ...interface{})
- func RecoverCallback(logger contract.Loggable, ...)
- func SetEnv(key, value string)
- type Application
- func (a *Application) Boot()
- func (a *Application) GetProvider(name string) contract.Provider
- func (a *Application) HasProvider(name string) bool
- func (a *Application) IsDevelopment() bool
- func (a *Application) IsProduction() bool
- func (a *Application) IsTesting() bool
- func (a *Application) Mode() uint8
- func (a *Application) PoolValue(name string) (interface{}, bool)
- func (a *Application) Register(provider contract.Provider, force bool)
- func (a *Application) RegisterMultiple(providers []contract.Provider, force bool)
- func (a *Application) RegisterPool(name string, poolNew contract.PoolFunc) error
- func (a *Application) ReleasePool(name string, value func() interface{})
- func (a *Application) Reset()
- func (a *Application) Resolve(abstract interface{}, params ...interface{}) interface{}
- func (a *Application) SetMode(mode uint8)
- func (a *Application) Version() string
- type BaseProvider
- type CommandOption
- type Config
- func (c *Config) Bind(name string, object interface{}) error
- func (c *Config) Clone() contract.Configuration
- func (c *Config) Exists(key string) bool
- func (c *Config) Get(key string) interface{}
- func (c *Config) GetBool(key string) bool
- func (c *Config) GetDuration(key string) time.Duration
- func (c *Config) GetFloat(key string) float64
- func (c *Config) GetInt(key string) int
- func (c *Config) GetIntSlice(key string) []int
- func (c *Config) GetString(key string) string
- func (c *Config) GetStringMap(key string) map[string]interface{}
- func (c *Config) GetStringMapString(key string) map[string]string
- func (c *Config) GetStringSlice(key string) []string
- func (c *Config) GetTime(key string) time.Time
- func (c *Config) Set(key string, value interface{})
- func (c *Config) SetDefault(key string, value interface{})
- type SchedulerRecoverError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() contract.Application
func NewCommand ¶
func NewCommand(option *CommandOption) contract.BaseCommand
func RecoverCallback ¶
func RecoverCallback(logger contract.Loggable, callback func(err interface{}, params ...interface{}), params ...interface{})
defer
Types ¶
type Application ¶
func (*Application) Boot ¶
func (a *Application) Boot()
func (*Application) GetProvider ¶
func (a *Application) GetProvider(name string) contract.Provider
func (*Application) HasProvider ¶
func (a *Application) HasProvider(name string) bool
func (*Application) IsDevelopment ¶
func (a *Application) IsDevelopment() bool
func (*Application) IsProduction ¶
func (a *Application) IsProduction() bool
func (*Application) IsTesting ¶
func (a *Application) IsTesting() bool
func (*Application) Mode ¶
func (a *Application) Mode() uint8
func (*Application) PoolValue ¶
func (a *Application) PoolValue(name string) (interface{}, bool)
func (*Application) Register ¶
func (a *Application) Register(provider contract.Provider, force bool)
func (*Application) RegisterMultiple ¶
func (a *Application) RegisterMultiple(providers []contract.Provider, force bool)
func (*Application) RegisterPool ¶
func (a *Application) RegisterPool(name string, poolNew contract.PoolFunc) error
func (*Application) ReleasePool ¶
func (a *Application) ReleasePool(name string, value func() interface{})
func (*Application) Reset ¶
func (a *Application) Reset()
func (*Application) Resolve ¶
func (a *Application) Resolve(abstract interface{}, params ...interface{}) interface{}
func (*Application) SetMode ¶
func (a *Application) SetMode(mode uint8)
func (*Application) Version ¶
func (a *Application) Version() string
type BaseProvider ¶
type BaseProvider struct { Config contract.Configuration `inject:"config"` Application contract.Application `inject:"application"` }
func (*BaseProvider) Bind ¶
func (p *BaseProvider) Bind(name string, prototype interface{}, options ...support.Option)
func (*BaseProvider) BindConfig ¶
func (p *BaseProvider) BindConfig(key string, object interface{}) error
func (*BaseProvider) Resolve ¶
func (p *BaseProvider) Resolve(abstract interface{}, params ...interface{}) interface{}
type CommandOption ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) Clone ¶
func (c *Config) Clone() contract.Configuration
func (*Config) GetDuration ¶
Get the time duration value of the specified key
func (*Config) GetIntSlice ¶
Get the int slice value of the specified key
func (*Config) GetStringMap ¶
Get the string map value of the specified key
func (*Config) GetStringMapString ¶
Get the string map string value of the specified key
func (*Config) GetStringSlice ¶
Get the string slice value of the specified key
func (*Config) SetDefault ¶
Set item default value if not exists
type SchedulerRecoverError ¶
type SchedulerRecoverError struct { Message string Recover interface{} }
func (SchedulerRecoverError) Error ¶
func (s SchedulerRecoverError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.