Documentation ¶
Index ¶
- func AutoConfig(basename, envPrefix, file string)
- func GetBool(key Key) bool
- func GetDuration(key Key) time.Duration
- func GetInt(key Key) int
- func GetString(key Key) string
- func MustBindFlag(key Key, cmd *cobra.Command, flag *pflag.Flag)
- func MustBindFlagLookup(key Key, cmd *cobra.Command, flagName string)
- func MustBindPersistentFlagLookup(key Key, cmd *cobra.Command, flagName string)
- func Set(key Key, value interface{})
- type Key
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoConfig ¶
func AutoConfig(basename, envPrefix, file string)
func GetDuration ¶
Types ¶
type Key ¶
type Key string
const ( KeyLogFile Key = "log.file" KeyLogDebug Key = "log.debug" KeyLogTrace Key = "log.trace" KeyLogTee Key = "log.tee" KeyDbURL Key = "db.url" KeyDbDriver Key = "db.driver" KeyDbConnMaxTotal Key = "db.conn.max_total" KeyDbConnMaxIdle Key = "db.conn.max_idle" KeyDbConnMaxLifetime Key = "db.conn.max_lifetime" KeyRedisURL Key = "redis.url" KeyRedisMaxRetries Key = "redis.max_retries" KeyRedisMinRetryBackoff Key = "redis.min_retry_backoff" KeyRedisMaxRetryBackoff Key = "redis.max_retry_backoff" KeyRedisDialTimeout Key = "redis.dial_timeout" KeyRedisReadTimeout Key = "redis.read_timeout" KeyRedisWriteTimeout Key = "redis.write_timeout" KeyRedisPoolSize Key = "redis.pool_size" KeyRedisMinIdleConns Key = "redis.min_idle_conns" KeyRedisMaxConnAge Key = "redis.max_conn_age" KeyRedisPoolTimeout Key = "redis.pool_timeout" KeyRedisIdleTimeout Key = "redis.idle_timeout" KeyRedisIdleCheckFrequency Key = "redis.idle_check_freq" KeySteamUser Key = "steam.user" KeySteamPassword Key = "steam.password" KeySteamAPIKey Key = "steam.api_key" KeyOpendotaAPIKey Key = "opendota.api_key" )
Click to show internal directories.
Click to hide internal directories.