Documentation ¶
Index ¶
- func NewOneConfig(params ...interface{}) (interface{}, error)
- type OneConfig
- func (conf *OneConfig) Get(key string) interface{}
- func (conf *OneConfig) GetBool(key string) bool
- func (conf *OneConfig) GetFloat64(key string) float64
- func (conf *OneConfig) GetInt(key string) int
- func (conf *OneConfig) GetIntSlice(key string) []int
- func (conf *OneConfig) GetString(key string) string
- func (conf *OneConfig) GetStringMap(key string) map[string]interface{}
- func (conf *OneConfig) GetStringMapString(key string) map[string]string
- func (conf *OneConfig) GetStringMapStringSlice(key string) map[string][]string
- func (conf *OneConfig) GetStringSlice(key string) []string
- func (conf *OneConfig) GetTime(key string) time.Time
- func (conf *OneConfig) IsExist(key string) bool
- func (conf *OneConfig) Load(key string, val interface{}) error
- type OneConfigProvider
- func (provider *OneConfigProvider) Boot(c framework.Container) error
- func (provider *OneConfigProvider) IsDefer() bool
- func (provider *OneConfigProvider) Name() string
- func (provider *OneConfigProvider) Params(c framework.Container) []interface{}
- func (provider *OneConfigProvider) Register(c framework.Container) framework.NewInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOneConfig ¶
func NewOneConfig(params ...interface{}) (interface{}, error)
NewOneConfig 初始化Config方法
Types ¶
type OneConfig ¶
type OneConfig struct {
// contains filtered or unexported fields
}
OneConfig 表示one框架的配置文件服务
func (*OneConfig) GetFloat64 ¶
GetFloat64 get float64
func (*OneConfig) GetIntSlice ¶
GetIntSlice get int slice type
func (*OneConfig) GetStringMap ¶
GetStringMap get map which key is string, value is interface
func (*OneConfig) GetStringMapString ¶
GetStringMapString get map which key is string, value is string
func (*OneConfig) GetStringMapStringSlice ¶
GetStringMapStringSlice get map which key is string, value is string slice
func (*OneConfig) GetStringSlice ¶
GetStringSlice get string slice type
type OneConfigProvider ¶
type OneConfigProvider struct{}
func (*OneConfigProvider) Boot ¶
func (provider *OneConfigProvider) Boot(c framework.Container) error
Boot will called when the service instantiate
func (*OneConfigProvider) IsDefer ¶
func (provider *OneConfigProvider) IsDefer() bool
IsDefer define whether the service instantiate when first make or register
func (*OneConfigProvider) Name ¶
func (provider *OneConfigProvider) Name() string
/ Name define the name for this service
func (*OneConfigProvider) Params ¶
func (provider *OneConfigProvider) Params(c framework.Container) []interface{}
Params define the necessary params for NewInstance
func (*OneConfigProvider) Register ¶
func (provider *OneConfigProvider) 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.