Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultConfigType = "yaml" DefaultConfigDir = "./appconfig" DefaultConfigFileName = "default" WorkDirEnv = "WORKDIR" EnvPrefix = "env|" FilePrefix = "file|" )
Default options for configuration loading.
Variables ¶
This section is empty.
Functions ¶
func SubstituteConfigValues ¶
SubstituteConfigValues recursively walks through the config struct and replaces string values of the form 'env|VAR' or 'file|/path' with the corresponding value.
Types ¶
type App ¶
type App struct {
Name string `yaml:"name"`
Version string `yaml:"version"`
Environment string `yaml:"environment"`
}
App represents the application configuration
type AppConfig ¶
type AppConfig struct {
App App `yaml:"app"`
LDAP ldap.LDAP `yaml:"ldap"`
Cache cache.Config `yaml:"cache"`
Backends []Backend `yaml:"backends"`
Pattern map[string][]PatternEntry `yaml:"pattern"`
HttpClient struct {
ConnectionPoolConfig httpclient.ConnectionPoolConfig `yaml:"connectionPoolConfig"`
HystrixResiliencyConfig httpclient.HystrixResiliencyConfig `yaml:"hystrixResiliencyConfig"`
} `yaml:"httpClient"`
BackendMap map[string]map[string]Backend `yaml:"-"`
}
Config represents the top-level configuration structure
func LoadConfig ¶
type Backend ¶
type Backend struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Enabled bool `yaml:"enabled"`
Connection map[string]interface{} `yaml:"connection"`
}
Backend represents a backend service configuration
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is a wrapper over a underlying config loader implementation.
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig returns new config struct with default options.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options is config options.
func NewDefaultOptions ¶
func NewDefaultOptions() Options
type PatternEntry ¶
PatternEntry represents the input and output pattern of group names
Click to show internal directories.
Click to hide internal directories.