Documentation ¶
Index ¶
- Constants
- func DefaultDecoderConfig() *mapstructure.DecoderConfig
- type Config
- func (c *Config) AddPath(path string) error
- func (c *Config) Data() map[string]interface{}
- func (c *Config) Decode(output interface{}, msdc *mapstructure.DecoderConfig, keys ...string) error
- func (c *Config) Get(keys ...string) (interface{}, error)
- func (c *Config) GetBool(keys ...string) (bool, error)
- func (c *Config) GetDuration(keys ...string) (time.Duration, error)
- func (c *Config) GetFloat64(keys ...string) (float64, error)
- func (c *Config) GetInt(keys ...string) (int, error)
- func (c *Config) GetString(keys ...string) (string, error)
- func (c *Config) GetStringSlice(keys ...string) ([]string, error)
- func (c *Config) IsSet(keys ...string) bool
- func (c *Config) LoadEnv(name, key string) bool
- func (c *Config) LoadFile(name string, mustExist bool) error
- func (c *Config) Set(value interface{}, keys ...string)
- func (c *Config) SetDefault(value interface{}, keys ...string)
- func (c *Config) SetEnvPrefix(prefix string)
- type Option
Constants ¶
View Source
const ErrKeyNotFound = errors.Sentinel("key not found")
Variables ¶
This section is empty.
Functions ¶
func DefaultDecoderConfig ¶
func DefaultDecoderConfig() *mapstructure.DecoderConfig
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) Decode ¶
func (c *Config) Decode(output interface{}, msdc *mapstructure.DecoderConfig, keys ...string) error
func (*Config) SetDefault ¶
func (*Config) SetEnvPrefix ¶
Click to show internal directories.
Click to hide internal directories.