Documentation ¶
Index ¶
- Constants
- type Config
- func (config *Config) GetBool(key string) bool
- func (config *Config) GetBoolWithDefault(key string, defaultVal bool) bool
- func (config *Config) GetInt(key string) int
- func (config *Config) GetMap(key string) map[string]interface{}
- func (config *Config) GetMapString(key string) map[string]string
- func (config *Config) GetString(key string) string
- func (config *Config) GetStringWithDefault(key string, defaultVal string) string
- func (config *Config) IsSet(key string) bool
- func (config *Config) Set(key string, value interface{})
Constants ¶
View Source
const ( // EvPrefix environment variable prefix EvPrefix = "ISLA" // EvSuffixForAPIClientHTTPTimeout environment variable name for API client http timeout EvSuffixForAPIClientHTTPTimeout = "APICLIENT_HTTP_TIMEOUT" // EvSuffixForDBHost environment variable name for database host EvSuffixForDBHost = "DB_HOST" // EvSuffixForDBPassword environment variable name for database bind user password EvSuffixForDBPassword = "DB_PWD" // EvSuffixForDBPort environment variable name for database port EvSuffixForDBPort = "DB_PORT" // EvSuffixForDBRequired environment variable name for database required flag EvSuffixForDBRequired = "DB_REQUIRED" // EvSuffixForDBUser environment variable name for database bind user EvSuffixForDBUser = "DB_USER" // EvSuffixForHTTPIdleTimeout environment variable name for HTT idle timeout EvSuffixForHTTPIdleTimeout = "HTTP_IDLE_TIMEOUT" // EvSuffixForHTTPReadTimeout environment variable name for HTTP read timeout EvSuffixForHTTPReadTimeout = "HTTP_READ_TIMEOUT" // EvSuffixForHTTPWriteTimeout environment variable name for http write timeout EvSuffixForHTTPWriteTimeout = "HTTP_WRITE_TIMEOUT" // EvSuffixForJwtSecret environment variable name for JWT secrete EvSuffixForJwtSecret = "JWT_SECRET" // EvSuffixForLogLevel environment variable name for log level EvSuffixForLogLevel = "LOG_LEVEL" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config sdk for getting key values from settings file
func (*Config) GetBoolWithDefault ¶ added in v1.0.0
GetBoolWithDefault returns boolean value set for the given key, if not set returns the given defaultVal
func (*Config) GetMap ¶ added in v0.0.54
GetMap returns the value associated with the given key as a map of interfaces
func (*Config) GetMapString ¶ added in v0.0.52
GetMapString returns the value associated with the given key as a map of strings
func (*Config) GetStringWithDefault ¶ added in v1.0.0
GetStringWithDefault return string value set for the given key, if not set returns the given defaultVal
Click to show internal directories.
Click to hide internal directories.