Documentation ¶
Index ¶
- func ReadYmlReader(path string) (cnf map[string]interface{}, err error)
- type YAMLConfig
- type YAMLConfigContainer
- func (c *YAMLConfigContainer) Bool(key string) (bool, error)
- func (c *YAMLConfigContainer) DIY(key string) (v interface{}, err error)
- func (c *YAMLConfigContainer) Float(key string) (float64, error)
- func (c *YAMLConfigContainer) Int(key string) (int, error)
- func (c *YAMLConfigContainer) Int64(key string) (int64, error)
- func (c *YAMLConfigContainer) Set(key, val string) error
- func (c *YAMLConfigContainer) String(key string) string
- func (c *YAMLConfigContainer) Strings(key string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type YAMLConfig ¶
type YAMLConfig struct { }
YAMLConfig is a yaml config parser and implements Config interface.
func (*YAMLConfig) Parse ¶
func (yaml *YAMLConfig) Parse(filename string) (config.ConfigContainer, error)
Parse returns a ConfigContainer with parsed yaml config map.
type YAMLConfigContainer ¶
A Config represents the yaml configuration.
func (*YAMLConfigContainer) Bool ¶
func (c *YAMLConfigContainer) Bool(key string) (bool, error)
Bool returns the boolean value for a given key.
func (*YAMLConfigContainer) DIY ¶
func (c *YAMLConfigContainer) DIY(key string) (v interface{}, err error)
DIY returns the raw value by a given key.
func (*YAMLConfigContainer) Float ¶
func (c *YAMLConfigContainer) Float(key string) (float64, error)
Float returns the float value for a given key.
func (*YAMLConfigContainer) Int ¶
func (c *YAMLConfigContainer) Int(key string) (int, error)
Int returns the integer value for a given key.
func (*YAMLConfigContainer) Int64 ¶
func (c *YAMLConfigContainer) Int64(key string) (int64, error)
Int64 returns the int64 value for a given key.
func (*YAMLConfigContainer) Set ¶
func (c *YAMLConfigContainer) Set(key, val string) error
WriteValue writes a new value for key.
func (*YAMLConfigContainer) String ¶
func (c *YAMLConfigContainer) String(key string) string
String returns the string value for a given key.
func (*YAMLConfigContainer) Strings ¶
func (c *YAMLConfigContainer) Strings(key string) []string
Strings returns the []string value for a given key.
Click to show internal directories.
Click to hide internal directories.