Documentation
¶
Overview ¶
Package config provides a global config store that other packages can utilise for fetching/storing configuration. The config store supports both file and environment configuration.
Index ¶
Constants ¶
View Source
const ( // AppName is the application name. AppName = "Foragd" // AppID is the application name formatted for use as an ID. AppID = "app.foragd" // AppDescription is the catch-line of the application. AppDescription = "" /* 136-byte string literal not displayed */ // ConfigEnvPrefix defines the environment variable prefix for reading // server configuration from the environment. ConfigEnvPrefix = "FORAGD_" )
Variables ¶
View Source
var ( ErrLoadConfig = errors.New("error loading config") ErrInvalidConfig = errors.New("invalid config") )
Functions ¶
func GetBaseURL ¶ added in v0.143.0
func GetBaseURL() string
func GetVersion ¶ added in v0.143.0
func GetVersion() string
func IsProduction ¶ added in v0.143.0
func IsProduction() bool
Types ¶
type Environment ¶
type Environment string
Environment is the app running environment.
const ( // EnvDevelopment represents a development environment. EnvDevelopment Environment = "development" // EnvProduction represents a production envrionment. EnvProduction Environment = "production" )
func GetEnvironment ¶ added in v0.143.0
func GetEnvironment() Environment
func (Environment) String ¶ added in v0.87.0
func (e Environment) String() string
Click to show internal directories.
Click to hide internal directories.