config

package
v0.0.0-...-f616f9a Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBool

func GetBool(viperkey string, env string, defaultVal bool) bool

GetBool get bool value in the viper and environment variable with default value

func GetInt

func GetInt(viperkey string, env string, defaultVal int) int

GetInt get integer value in the viper and environment variable with default value

func GetString

func GetString(viperkey string, env string, defaultVal string) string

GetString get integer value in the viper and environment variable with default value

func GetStringFromBase64Encoded

func GetStringFromBase64Encoded(viperkey string, env string) string

GetStringFromBase64Encoded get string from base64 encoded value in the viper and environment variable

func NewConfig

func NewConfig(configPath, configName, envPrefix string) *viper.Viper

NewConfig return a viper.Viper instance from given configuration details Configuration details consist of the configuration file path, configuration file name, also the env prefix if available

Types

This section is empty.

Jump to

Keyboard shortcuts

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