-
Notifications
You must be signed in to change notification settings - Fork 0
/
installer_eng.go
34 lines (29 loc) · 1.15 KB
/
installer_eng.go
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
package install
import (
"log"
"github.com/c-rainbow/simplechatbot/api/helix"
"github.com/c-rainbow/simplechatbot/client"
"github.com/c-rainbow/simplechatbot/flags"
"github.com/go-ini/ini"
)
var (
InstallerMessagesEnglish = &InstallerMessages{
NoHelixClient: "Cannot connect to Twitch API.",
TwitchUsersAPIError: "Error getting data from Twitch Users API.",
TwitchBotAccountNotFound: "Twitch Bot account not found.",
TwitchChannelAccountNotFound: "Twitch account for the channel not found.",
ChatServerSuccessfulLogin: "Successfully logged in to the chat server. Disconnecting..",
ChatServerFailedLogin: "Failed to log in to the chat server. Please make sure the config is correct.",
DynamoDBConnectionError: "Error while connecting to DynamoDB.",
}
)
func NewInstallerEng() *Installer {
iniFile, err := ini.Load(flags.InstallationConfigFile)
if err != nil {
log.Fatalln("Failed to load config file.", err.Error())
}
installer := &Installer{
iniFile: iniFile, ircClientFunc: client.NewTwitchClient, helixClientFunc: helix.NewHelixClient,
messages: InstallerMessagesEnglish}
return installer
}