config

package
v0.1.9-patch-02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmbeddedMode    = "embedded"
	MasterMode      = "master"
	MasterSlaveMode = "master_and_slave"
	SlaveMode       = "slave"
	OffMode         = "off"
)

Variables

This section is empty.

Functions

func GetBool

func GetBool(key string, defaultValue bool) bool

GetBool is a wrapper for viper's GetBool

func GetDuration

func GetDuration(key string, defaultValue time.Duration) time.Duration

GetDuration is wrapper for viper's GetDuration

func GetEnv

func GetEnv(key string, defaultVal string) string

GetEnv returns the environment value stored in key variable

func GetEnvAsBool

func GetEnvAsBool(name string, defaultVal bool) bool

GetEnvAsBool returns the boolean environment value stored in key variable

func GetFloat64

func GetFloat64(key string, defaultValue float64) float64

GetFloat64 is wrapper for viper's GetFloat64

func GetInt

func GetInt(key string, defaultValue int) int

GetInt is wrapper for viper's GetInt

func GetInt64

func GetInt64(key string, defaultValue int64) int64

GetInt64 is wrapper for viper's GetInt

func GetRequiredEnv

func GetRequiredEnv(key string) string

GetRequiredEnv returns the environment value stored in key variable, no default

func GetString

func GetString(key string, defaultValue string) string

GetString is wrapper for viper's GetString

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

func Initialize

func Initialize()

Initialize initializes the config

func SetBool

func SetBool(key string, value bool)

SetBool override existing config

func SetString

func SetString(key string, value string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL