Documentation ¶
Overview ¶
Package config implements the configuration loader.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // App holds the value of the APP environment variable. App string Ports struct { // Global holds the value of the PORT_GLOBAL environment variable. Global int // Local holds the value of the PORT_LOCAL environment variable. Local int // Relay holds the value of the PORT_RELAY environment variable. Relay int // HTTP holds the value of the PORT_HTTP environment variable. HTTP int } }
Config wraps the properties of the configuration.
func FromContext ¶
FromContext returns the Config the given Context carries.
FromContext panics in case the given Context carries no Config.
Click to show internal directories.
Click to hide internal directories.