Documentation
¶
Overview ¶
Package config manages loading config variables from environment
Index ¶
Constants ¶
View Source
const VersionString = "v1.6.0"
VersionString current tagged version for application
Variables ¶
View Source
var TokenPath = "discord.token"
Functions ¶
func LoadConfig ¶ added in v1.2.0
func LoadConfig() error
func SetConfigDefaults ¶ added in v1.1.0
func SetConfigDefaults()
Types ¶
type App ¶ added in v1.2.0
type App struct { Quotes quotes.QuoteEngine DNotationParser *parser.DNotationParser ThresholdRoller *roller.ThresholdRoller ConnPool model.DbPool Stats *stats.Stats CursedChannelCache cache.ChannelCache CursedWordCache cache.StringListCache }
App represents the current app components & state
type Config ¶
type Config struct { Discord DiscordConfig Metrics MetricsConfig Db DbConfig }
var GlobalConfig Config
type DiscordConfig ¶ added in v1.2.0
type DiscordConfig struct { AppId string `mapstructure:"app_id"` Token string `mapstructure:"token"` ShardId uint64 `mapstructure:"shard_id"` ShardCount uint64 `mapstructure:"shard_count"` InsomniacIds []string `mapstructure:"insomniac_ids"` InsomniacRoles []string `mapstructure:"insomniac_roles"` ListenConfigs []ListenConfig `mapstructure:"listen_configs"` DefaultWeatherLocations []string `mapstructure:"default_weather_locations"` ListenChannelSet map[string]*ListenConfig }
type ListenConfig ¶ added in v1.2.0
type MetricsConfig ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.