viperconfig

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfFileViper

func CreateConfFileViper(filePath, confName, confType string) *viper.Viper

CreateConfFileViper creates viper to read from config file Now the config file is JSON type, name is "config.json"

func CreateEnvViper

func CreateEnvViper() *viper.Viper

CreateEnvViper creates viper to read variables from system enviroment

func ResetConfBool

func ResetConfBool(value *bool, envViper *viper.Viper, configFileViper *viper.Viper, sectionName string, flagName string)

ResetConfBool resets Bool value to value from config files and system environment variable

func ResetConfInt

func ResetConfInt(value *int, envViper *viper.Viper, configFileViper *viper.Viper, sectionName string, flagName string)

ResetConfInt resets INT value to value from config files and system environment variable

func ResetConfString

func ResetConfString(value *string, envViper *viper.Viper, configFileViper *viper.Viper, sectionName string, flagName string)

ResetConfString resets String value to value from config files and system environment variable

func ResetConfUInt

func ResetConfUInt(value *uint, envViper *viper.Viper, configFileViper *viper.Viper, sectionName string, flagName string)

ResetConfUInt resets UInt value to value from config files and system environment variable

Types

This section is empty.

Jump to

Keyboard shortcuts

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