Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig(c Configurer) error
func ReadConfigProperty ¶
func ReadConfigProperty(c Configurer, queryPath string) (string, error)
Types ¶
type Config ¶
type Config struct { Configurer `json:"-"` Env string `json:"env"` LogFile string `json:"logFile"` VerboseLogging bool `json:"verboseLogging"` }
func (*Config) LogSummary ¶
func (c *Config) LogSummary()
type Configurer ¶
type Configurer interface { // Load reads in a configuration as a function of GO_ENV and the validates it. For GO_ENV=development, we'll load // the production configuration first and then layer development on top as overrides. Load() error // LogSummary prints out details about the configuration. LogSummary() // ReadProperty lets properties be read from the config using a query path // (e.g. "objectA.arrayB.0"). If any errors occur, we return an empty string. ReadProperty(queryPath string) (string, error) // Validates the configuration. Validate() error }
Click to show internal directories.
Click to hide internal directories.