Documentation ¶
Index ¶
- func NewHadeConfig(params ...interface{}) (interface{}, error)
- type HadeConfig
- func (conf *HadeConfig) Get(key string) interface{}
- func (conf *HadeConfig) GetBool(key string) bool
- func (conf *HadeConfig) GetFloat64(key string) float64
- func (conf *HadeConfig) GetInt(key string) int
- func (conf *HadeConfig) GetIntSlice(key string) []int
- func (conf *HadeConfig) GetString(key string) string
- func (conf *HadeConfig) GetStringMap(key string) map[string]interface{}
- func (conf *HadeConfig) GetStringMapString(key string) map[string]string
- func (conf *HadeConfig) GetStringMapStringSlice(key string) map[string][]string
- func (conf *HadeConfig) GetStringSlice(key string) []string
- func (conf *HadeConfig) GetTime(key string) time.Time
- func (conf *HadeConfig) IsExist(key string) bool
- func (conf *HadeConfig) Load(key string, val interface{}) error
- type HadeConfigProvider
- func (provider *HadeConfigProvider) Boot(c framework.Container) error
- func (provider *HadeConfigProvider) IsDefer() bool
- func (provider *HadeConfigProvider) Name() string
- func (provider *HadeConfigProvider) Params(c framework.Container) []interface{}
- func (provider *HadeConfigProvider) Register(c framework.Container) framework.NewInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHadeConfig ¶
func NewHadeConfig(params ...interface{}) (interface{}, error)
NewHadeConfig初始化Config方法
Types ¶
type HadeConfig ¶
type HadeConfig struct {
// contains filtered or unexported fields
}
HadeConfig表示hade框架的配置文件服务
func (*HadeConfig) Get ¶
func (conf *HadeConfig) Get(key string) interface{}
func (*HadeConfig) GetBool ¶
func (conf *HadeConfig) GetBool(key string) bool
func (*HadeConfig) GetFloat64 ¶
func (conf *HadeConfig) GetFloat64(key string) float64
func (*HadeConfig) GetInt ¶
func (conf *HadeConfig) GetInt(key string) int
func (*HadeConfig) GetIntSlice ¶
func (conf *HadeConfig) GetIntSlice(key string) []int
func (*HadeConfig) GetString ¶
func (conf *HadeConfig) GetString(key string) string
func (*HadeConfig) GetStringMap ¶
func (conf *HadeConfig) GetStringMap(key string) map[string]interface{}
func (*HadeConfig) GetStringMapString ¶
func (conf *HadeConfig) GetStringMapString(key string) map[string]string
func (*HadeConfig) GetStringMapStringSlice ¶
func (conf *HadeConfig) GetStringMapStringSlice(key string) map[string][]string
func (*HadeConfig) GetStringSlice ¶
func (conf *HadeConfig) GetStringSlice(key string) []string
func (*HadeConfig) IsExist ¶
func (conf *HadeConfig) IsExist(key string) bool
func (*HadeConfig) Load ¶
func (conf *HadeConfig) Load(key string, val interface{}) error
Load a config to a struct, val should be an pointer
type HadeConfigProvider ¶
type HadeConfigProvider struct{}
func (*HadeConfigProvider) Boot ¶
func (provider *HadeConfigProvider) Boot(c framework.Container) error
func (*HadeConfigProvider) IsDefer ¶
func (provider *HadeConfigProvider) IsDefer() bool
func (*HadeConfigProvider) Name ¶
func (provider *HadeConfigProvider) Name() string
func (*HadeConfigProvider) Params ¶
func (provider *HadeConfigProvider) Params(c framework.Container) []interface{}
func (*HadeConfigProvider) Register ¶
func (provider *HadeConfigProvider) Register(c framework.Container) framework.NewInstance
Click to show internal directories.
Click to hide internal directories.