Documentation ¶
Index ¶
- type ConfigSection
- func (m *ConfigSection) GetBool(key string) bool
- func (m *ConfigSection) GetBoolDefault(key string, def bool) bool
- func (m *ConfigSection) GetDuration(key string) time.Duration
- func (m *ConfigSection) GetDurationDefault(key string, def time.Duration) time.Duration
- func (m *ConfigSection) GetFloat64(key string) float64
- func (m *ConfigSection) GetFloat64Default(key string, def float64) float64
- func (m *ConfigSection) GetInt(key string) int
- func (m *ConfigSection) GetIntDefault(key string, def int) int
- func (m *ConfigSection) GetObject(key string) interface{}
- func (m *ConfigSection) GetObjectDefault(key string, def interface{}) interface{}
- func (m *ConfigSection) GetRaw() interface{}
- func (m *ConfigSection) GetSection(key string) (*ConfigSection, error)
- func (m *ConfigSection) GetString(key string) string
- func (m *ConfigSection) GetStringDefault(key string, def string) string
- func (m *ConfigSection) GetStringList(key string) []string
- func (m *ConfigSection) MustGetSection(key string) *ConfigSection
- func (m *ConfigSection) Unmarshal(target interface{}) error
- type YamlConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigSection ¶
type ConfigSection struct {
// contains filtered or unexported fields
}
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetBool ¶
func (m *ConfigSection) GetBool(key string) bool
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetBoolDefault ¶
func (m *ConfigSection) GetBoolDefault(key string, def bool) bool
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetDuration ¶
func (m *ConfigSection) GetDuration(key string) time.Duration
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetDurationDefault ¶
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetFloat64 ¶
func (m *ConfigSection) GetFloat64(key string) float64
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetFloat64Default ¶
func (m *ConfigSection) GetFloat64Default(key string, def float64) float64
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetInt ¶
func (m *ConfigSection) GetInt(key string) int
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetIntDefault ¶
func (m *ConfigSection) GetIntDefault(key string, def int) int
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetObject ¶
func (m *ConfigSection) GetObject(key string) interface{}
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetObjectDefault ¶
func (m *ConfigSection) GetObjectDefault(key string, def interface{}) interface{}
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetRaw ¶
func (m *ConfigSection) GetRaw() interface{}
func (*ConfigSection) GetSection ¶
func (m *ConfigSection) GetSection(key string) (*ConfigSection, error)
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetString ¶
func (m *ConfigSection) GetString(key string) string
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetStringDefault ¶
func (m *ConfigSection) GetStringDefault(key string, def string) string
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) GetStringList ¶
func (m *ConfigSection) GetStringList(key string) []string
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) MustGetSection ¶
func (m *ConfigSection) MustGetSection(key string) *ConfigSection
//////////////////////////////////////////////////////////////////////////////
func (*ConfigSection) Unmarshal ¶
func (m *ConfigSection) Unmarshal(target interface{}) error
//////////////////////////////////////////////////////////////////////////////
type YamlConfig ¶
type YamlConfig struct {
// contains filtered or unexported fields
}
func New ¶
func New(filePath string) *YamlConfig
//////////////////////////////////////////////////////////////////////////////
func (*YamlConfig) GetConfigSection ¶
func (c *YamlConfig) GetConfigSection(key string) (*ConfigSection, error)
//////////////////////////////////////////////////////////////////////////////
func (*YamlConfig) Load ¶
func (c *YamlConfig) Load(loadDefaults loadDefFn, watchConfig bool) error
//////////////////////////////////////////////////////////////////////////////
func (*YamlConfig) SetDefault ¶
func (c *YamlConfig) SetDefault(key string, value interface{})
//////////////////////////////////////////////////////////////////////////////