Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
Middleware returns a middleware that injects the specified Env in requests.
Types ¶
type ContextKey ¶
type ContextKey string
ContextKey is the type of the key used with context to carry contextual environment.
type Env ¶
type Env struct { Environment Environment Config map[ConfigKey]string }
Env is the value stored in context that stores the current environment along with configuration values.
type Environment ¶
type Environment string
Environment is the type of the possible environment values.
const ( // Production is the production environment. Production Environment = "prod" // QA is the qa environment. QA Environment = "qa" )
Click to show internal directories.
Click to hide internal directories.