Documentation ¶
Index ¶
- func GetBoolEnv(key string, fallback bool) bool
- func GetEnv(key, fallback string) string
- func GetInt64Env(key string, fallback int64) int64
- func GetIntEnv(key string, fallback int) int
- type Cfg
- func (c Cfg) Get(key string) string
- func (c Cfg) GetBool(key string) bool
- func (c Cfg) GetBoolF(key string, fallback bool) bool
- func (c Cfg) GetF(key, fallback string) string
- func (c Cfg) GetInt(key string) int
- func (c Cfg) GetInt64(key string) int64
- func (c Cfg) GetInt64F(key string, fallback int64) int64
- func (c Cfg) GetIntF(key string, fallback int) int
- func (c Cfg) Init() error
- type ConfigurationInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBoolEnv ¶
Get environment variable value as boolean
func GetInt64Env ¶
Get environment variable value as int64
Types ¶
type Cfg ¶
type Cfg struct { }
Configuration object with usefull methods
type ConfigurationInterface ¶ added in v0.0.11
type ConfigurationInterface interface { Init() error Get(key string) string GetBool(key string) bool GetInt(key string) int GetInt64(key string) int64 GetF(key, fallback string) string GetBoolF(key string, fallback bool) bool GetIntF(key string, fallback int) int GetInt64F(key string, fallback int64) int64 }
Default interface to be used on others modules
Click to show internal directories.
Click to hide internal directories.