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