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