Documentation ¶
Index ¶
- func NewFlyConfig(params ...interface{}) (interface{}, error)
- type FlyConfig
- func (conf *FlyConfig) Get(key string) interface{}
- func (conf *FlyConfig) GetBool(key string) bool
- func (conf *FlyConfig) GetFloat64(key string) float64
- func (conf *FlyConfig) GetInt(key string) int
- func (conf *FlyConfig) GetIntSlice(key string) []int
- func (conf *FlyConfig) GetString(key string) string
- func (conf *FlyConfig) GetStringMap(key string) map[string]interface{}
- func (conf *FlyConfig) GetStringMapString(key string) map[string]string
- func (conf *FlyConfig) GetStringMapStringSlice(key string) map[string][]string
- func (conf *FlyConfig) GetStringSlice(key string) []string
- func (conf *FlyConfig) GetTime(key string) time.Time
- func (conf *FlyConfig) IsExist(key string) bool
- func (conf *FlyConfig) Load(key string, val interface{}) error
- type FlyConfigProvider
- func (provider *FlyConfigProvider) Boot(c framework.Container) error
- func (provider *FlyConfigProvider) IsDefer() bool
- func (provider *FlyConfigProvider) Name() string
- func (provider *FlyConfigProvider) Params(c framework.Container) []interface{}
- func (provider *FlyConfigProvider) Register(c framework.Container) framework.NewInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFlyConfig ¶
func NewFlyConfig(params ...interface{}) (interface{}, error)
NewFlyConfig 初始化Config方法
Types ¶
type FlyConfig ¶
type FlyConfig struct {
// contains filtered or unexported fields
}
FlyConfig 表示fly框架的配置文件服务
func (*FlyConfig) GetFloat64 ¶
GetFloat64 get float64
func (*FlyConfig) GetIntSlice ¶
GetIntSlice get int slice type
func (*FlyConfig) GetStringMap ¶
GetStringMap get map which key is string, value is interface
func (*FlyConfig) GetStringMapString ¶
GetStringMapString get map which key is string, value is string
func (*FlyConfig) GetStringMapStringSlice ¶
GetStringMapStringSlice get map which key is string, value is string slice
func (*FlyConfig) GetStringSlice ¶
GetStringSlice get string slice type
type FlyConfigProvider ¶
type FlyConfigProvider struct{}
func (*FlyConfigProvider) Boot ¶
func (provider *FlyConfigProvider) Boot(c framework.Container) error
Boot will called when the service instantiate
func (*FlyConfigProvider) IsDefer ¶
func (provider *FlyConfigProvider) IsDefer() bool
IsDefer define whether the service instantiate when first make or register
func (*FlyConfigProvider) Name ¶
func (provider *FlyConfigProvider) Name() string
/ Name define the name for this service
func (*FlyConfigProvider) Params ¶
func (provider *FlyConfigProvider) Params(c framework.Container) []interface{}
Params define the necessary params for NewInstance
func (*FlyConfigProvider) Register ¶
func (provider *FlyConfigProvider) Register(c framework.Container) framework.NewInstance
Register registe a new function for make a service instance
Click to show internal directories.
Click to hide internal directories.