Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Api = scapi.CreateApiClient(Config.ScApiToken, "Janus Bot")
View Source
var Cache = cache.New(&cache.Options{ Redis: Redis, })
View Source
var Config = LoadConfig(".")
Functions ¶
This section is empty.
Types ¶
type ConfigOptions ¶
type ConfigOptions struct { AppEnv string `mapstructure:"APP_ENV"` Token string `mapstructure:"TOKEN"` ScApiToken string `mapstructure:"SCAPI_TOKEN"` RedisAddress string `mapstructure:"REDIS_ADDRESS"` SentryDSN string `mapstructure:"SENTRY_DSN"` // bot list tokens TopGGToken string `mapstructure:"TOPGG_TOKEN"` DBotListToken string `mapstructure:"DBOTLIST_TOKEN"` // only if using in http mode WebhookAddress string `mapstructure:"WEBHOOK_ADDR"` WebhookPubkey string `mapstructure:"WEBHOOK_PUBKEY"` // when appenv != production TestGuildId string `mapstructure:"TEST_GUILD_ID"` // debug flag Debug bool `mapstructure:"DEBUG"` }
func LoadConfig ¶
func LoadConfig(path string) (config ConfigOptions)
LoadConfig reads configuration from file or environment variables.
Click to show internal directories.
Click to hide internal directories.