Documentation
¶
Overview ¶
The config package provides JSON-based configuration files, with automatic environment variable overriding.
Index ¶
- type ConfigLoader
- func (cl ConfigLoader) GetValue(from interface{}, name string) (interface{}, error)
- func (cl ConfigLoader) Load(target interface{}, filePath string) error
- func (cl *ConfigLoader) SetDebugFunc(f func(...interface{}))
- func (cl *ConfigLoader) SetLogFunc(f func(...interface{}))
- func (cl ConfigLoader) SetValue(target interface{}, name, value string) error
- type DefaultFiller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigLoader ¶
type ConfigLoader struct {
// Log is called with debug level logs about how values are resolved.
Debug, Info func(...interface{})
}
ConfigLoader loads configuration.
func New ¶
func New() ConfigLoader
func (ConfigLoader) GetValue ¶
func (cl ConfigLoader) GetValue(from interface{}, name string) (interface{}, error)
func (ConfigLoader) Load ¶
func (cl ConfigLoader) Load(target interface{}, filePath string) error
func (*ConfigLoader) SetDebugFunc ¶
func (cl *ConfigLoader) SetDebugFunc(f func(...interface{}))
func (*ConfigLoader) SetLogFunc ¶
func (cl *ConfigLoader) SetLogFunc(f func(...interface{}))
func (ConfigLoader) SetValue ¶
func (cl ConfigLoader) SetValue(target interface{}, name, value string) error
type DefaultFiller ¶
type DefaultFiller interface {
FillDefaults() error
}
Click to show internal directories.
Click to hide internal directories.