Documentation ¶
Index ¶
- func Init()
- func KeyMap() map[string]interface{}
- func OnChange(cb func(*Config))
- func Unmarshal(key string, object interface{}) error
- type Config
- func (c *Config) GetKeyMap() map[string]interface{}
- func (c *Config) Keys() []string
- func (c *Config) Load(provider Provider, parser Parser) error
- func (c *Config) OnChange(cb func(*Config))
- func (c *Config) Print() string
- func (c *Config) SetDelimiter(delimiter string)
- func (c *Config) Unmarshal(key string, object interface{}) error
- type Parser
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) Keys ¶
Keys returns the slice of all flattened keys in the loaded configuration sorted alphabetically.
func (*Config) Load ¶
Load takes a Provider that either provides a parsed config map[string]interface{} in which case pa (Parser) can be nil, or raw bytes to be parsed, where a Parser can be provided to parse.
func (*Config) Print ¶
Print prints a key -> value string representation of the config map with keys sorted alphabetically.
func (*Config) SetDelimiter ¶
Click to show internal directories.
Click to hide internal directories.