Documentation ¶
Index ¶
- Constants
- func GetBool(key string, defaultValue bool) bool
- func GetDuration(key string, defaultValue time.Duration) time.Duration
- func GetEnv(key string, defaultVal string) string
- func GetEnvAsBool(name string, defaultVal bool) bool
- func GetFloat64(key string, defaultValue float64) float64
- func GetInt(key string, defaultValue int) int
- func GetInt64(key string, defaultValue int64) int64
- func GetRequiredEnv(key string) string
- func GetString(key string, defaultValue string) string
- func GetWorkspaceToken() string
- func Initialize()
- func SetBool(key string, value bool)
- func SetString(key string, value string)
Constants ¶
View Source
const ( EmbeddedMode = "embedded" MasterMode = "master" MasterSlaveMode = "master_and_slave" SlaveMode = "slave" OffMode = "off" )
Variables ¶
This section is empty.
Functions ¶
func GetDuration ¶
GetDuration is wrapper for viper's GetDuration
func GetEnvAsBool ¶
GetEnvAsBool returns the boolean environment value stored in key variable
func GetFloat64 ¶
GetFloat64 is wrapper for viper's GetFloat64
func GetRequiredEnv ¶
GetRequiredEnv returns the environment value stored in key variable, no default
func GetWorkspaceToken ¶
func GetWorkspaceToken() string
GetWorkspaceToken returns the workspace token provided in the environment variables Env variable CONFIG_BACKEND_TOKEN is deprecating soon WORKSPACE_TOKEN is newly introduced. This will override CONFIG_BACKEND_TOKEN
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.