Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvironmentPrefix = "GS_ENVS_PREFIX" IncludeEnvPatterns = "INCLUDE_ENV_PATTERNS" ExcludeEnvPatterns = "EXCLUDE_ENV_PATTERNS" )
View Source
const CommandArgsPrefix = "GS_ARGS_PREFIX"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct {
LocalFile *PropertySources
RemoteFile *PropertySources
RemoteProp gs.Properties
Environment *Environment
CommandArgs *CommandArgs
}
AppConfig is a layered app configuration.
func NewAppConfig ¶
func NewAppConfig() *AppConfig
type BootConfig ¶
type BootConfig struct {
LocalFile *PropertySources
Environment *Environment
CommandArgs *CommandArgs
}
BootConfig is a layered boot configuration.
func NewBootConfig ¶
func NewBootConfig() *BootConfig
func (*BootConfig) Refresh ¶
func (c *BootConfig) Refresh() (gs.Properties, error)
Refresh merges all layers into a properties as read-only.
type CommandArgs ¶
type CommandArgs struct{}
CommandArgs command-line parameters
func NewCommandArgs ¶
func NewCommandArgs() *CommandArgs
func (*CommandArgs) CopyTo ¶
func (c *CommandArgs) CopyTo(out *conf.Properties) error
CopyTo loads parameters passed in the form of -D key[=value/true].
type ConfigType ¶
type ConfigType string
const ( ConfigTypeLocal ConfigType = "local" ConfigTypeRemote ConfigType = "remote" )
type Environment ¶
type Environment struct{}
Environment environment variable
func NewEnvironment ¶
func NewEnvironment() *Environment
func (*Environment) CopyTo ¶
func (c *Environment) CopyTo(p *conf.Properties) error
CopyTo add environment variables that matches IncludeEnvPatterns and exclude environment variables that matches ExcludeEnvPatterns.
type PropertySources ¶
type PropertySources struct {
// contains filtered or unexported fields
}
PropertySources is a collection of locations.
func NewPropertySources ¶
func NewPropertySources(configType ConfigType, configName string) *PropertySources
func (*PropertySources) AddLocation ¶
func (p *PropertySources) AddLocation(location ...string)
AddLocation adds a location.
Click to show internal directories.
Click to hide internal directories.