-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.go
More file actions
39 lines (35 loc) · 1.19 KB
/
config.go
File metadata and controls
39 lines (35 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"os"
)
var (
configErrors []string
)
type Config struct {
DiscordToken string
DiscordGuildID string
KaminoUser string
KaminoPass string
KaminoURL string
KaminoLoginEndpoint string
KaminoGetPodsEndpoint string
KaminoDeleteEndpoint string
KaminoBulkDeleteEndpoint string
KaminoRefreshTemplatesEndpoint string
KaminoCompetitionCloneEndpoint string
DBPath string
}
func ReadConfig(conf *Config) {
conf.DiscordToken = os.Getenv("DISCORD_TOKEN")
conf.DiscordGuildID = os.Getenv("DISCORD_GUILD_ID")
conf.KaminoUser = os.Getenv("KAMINO_USER")
conf.KaminoPass = os.Getenv("KAMINO_PASS")
conf.KaminoURL = os.Getenv("KAMINO_URL")
conf.KaminoLoginEndpoint = os.Getenv("KAMINO_LOGIN_ENDPOINT")
conf.KaminoGetPodsEndpoint = os.Getenv("KAMINO_GET_PODS_ENDPOINT")
conf.KaminoDeleteEndpoint = os.Getenv("KAMINO_DELETE_ENDPOINT")
conf.KaminoBulkDeleteEndpoint = os.Getenv("KAMINO_BULK_DELETE_ENDPOINT")
conf.KaminoRefreshTemplatesEndpoint = os.Getenv("KAMINO_REFRESH_TEMPLATES_ENDPOINT")
conf.KaminoCompetitionCloneEndpoint = os.Getenv("KAMINO_COMPETITION_CLONE_ENDPOINT")
conf.DBPath = os.Getenv("DB_PATH")
}