Documentation ¶
Overview ¶
Package config defines the config struct and provides utility methods for querying it. Additionally it handles loading the config.json if present and holds various other global values used in the app.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Logger *log.Logger
Functions ¶
func DBURL ¶
func DBURL() string
DBURL will return the environment variable PRAELATUS_DB if set, otherwise return the default development database url.
func LogWriter ¶
LogWriter will return an io.writer that is created based on environment configuration
func Port ¶
func Port() string
Port will return the port / interfaces for the api to listen on based on the configuration
func SessionURL ¶
func SessionURL() string
SessionURL will get the url to use for redis or file location for boltdb
func WebWorkers ¶
func WebWorkers() int
WebWorkers returns the number of web workers to run for sending http requests from hooks
Types ¶
type Config ¶
type Config struct { DBURL string DBName string SessionURL string Port string LogLocations []string SessionStore string AWS AWSConfig }
Config holds much of the configuration for praelatus, if reading from the configuration you should use the helper methods in this package as they do some prequisite processing and return appropriate types.
var Cfg Config
Cfg is the global config variable used in the helper methods of this package