Documentation ¶
Index ¶
- func GetAbsFilename(file, projFolder string) (string, error)
- type Factory
- func (f *Factory) Load(configFile string, config interface{}) (absConfigFile string, err error)
- func (f *Factory) LoadForHostName(configFile, hostnameOverride string, config interface{}) (absConfigFile string, err error)
- func (f *Factory) ResolveConfigFile(configFile string) (absConfigFile, baseDir string, err error)
- func (f *Factory) WithEnvironment(environment string) *Factory
- func (f *Factory) WithOverride(file string) *Factory
- type Hostmap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAbsFilename ¶
GetAbsFilename returns absolute path for the file from the relative path to projFolder
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory is used to create Configuration instance
func NewFactory ¶
NewFactory returns new configuration factory
func (*Factory) Load ¶
Load will load the configuration from the named config file, apply any overrides, and resolve relative directory locations.
func (*Factory) LoadForHostName ¶
func (f *Factory) LoadForHostName(configFile, hostnameOverride string, config interface{}) (absConfigFile string, err error)
LoadForHostName will load the configuration from the named config file for specified host name, apply any overrides, and resolve relative directory locations.
func (*Factory) ResolveConfigFile ¶
ResolveConfigFile returns absolute path for the config file
func (*Factory) WithEnvironment ¶
WithEnvironment allows to override environment in Configuration
func (*Factory) WithOverride ¶
WithOverride allows to specify additional override config file