Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBadEnvironmentVariableSet occurs when the AGORA_ENVIRONMENT environment variable is set to an invalid value ErrBadEnvironmentVariableSet = errors.New("environment variable AGORA_ENVIRONMENT was not 'prod', 'dev', or 'test'") )
Functions ¶
This section is empty.
Types ¶
type AgoraEnvironment ¶
type AgoraEnvironment string
AgoraEnvironment is used to determine which environment the application is currently running in
const ( // AgoraEnvironmentProd is the production environment AgoraEnvironmentProd AgoraEnvironment = "prod" // AgoraEnvironmentDev is the development environment AgoraEnvironmentDev AgoraEnvironment = "dev" // AgoraEnvironmentTest is meant to be used in go tests AgoraEnvironmentTest AgoraEnvironment = "test" )
func FromEnvVariable ¶
func FromEnvVariable() (AgoraEnvironment, error)
FromEnvVariable will try to retrieve the environment variable AGORA_ENVIRONMENT. If the value is not 'prod', 'dev', or 'test', it will return an error
func (AgoraEnvironment) IsValid ¶
func (env AgoraEnvironment) IsValid() bool
IsValid returns true if the AgoraEnvironment is valid.
Click to show internal directories.
Click to hide internal directories.