Documentation ¶
Index ¶
- Constants
- Variables
- func ReadBot(iniFile *ini.File) *models.Bot
- func ReadChannel(iniFile *ini.File) *models.Channel
- func ReadClientID(iniFile *ini.File) string
- type DynamoDBConfig
- type Installer
- func (installer *Installer) CreateHelixClient(clientID string) (helix.HelixClientT, error)
- func (installer *Installer) Install() error
- func (installer *Installer) PopulateBotModel(helixClient helix.HelixClientT, bot *models.Bot) error
- func (installer *Installer) PopulateChannelModel(helixClient helix.HelixClientT, channel *models.Channel) error
- func (installer *Installer) TryAccessingChatServer(bot *models.Bot) error
- func (installer *Installer) TryAccessingDynamoDB(dbConfig *DynamoDBConfig) (*dynamo.DB, error)
- type InstallerMessages
Constants ¶
View Source
const ( DefaultBotSection = "DefaultBot" DefaultChannelSection = "DefaultChannel" )
Variables ¶
View Source
var (
ErrNoHelixClient = errors.New("Cannot create a new Helix API client")
)
View Source
var (
ErrTwitchAccoutNotFound = errors.New("Twitch Account Not Found")
)
View Source
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.",
}
)
View Source
var (
InstallerMessagesKorean = &InstallerMessages{
NoHelixClient: "트위치 API에 연결할 수 없습니다",
TwitchUsersAPIError: "트위치 Users API 에서 정보를 가져올 수 없습니다",
TwitchBotAccountNotFound: "봇 계정을 찾을 수 없습니다",
TwitchChannelAccountNotFound: "채널 계정을 찾을 수 없습니다",
ChatServerSuccessfulLogin: "채팅 서버에 성공적으로 접속하였습니다. 3초 후 접속을 종료합니다",
ChatServerFailedLogin: "채팅 서버 접속에 실패하였습니다. 설정을 확인해 주세요.",
DynamoDBConnectionError: "DynamoDB에 접속 중 오류가 발생했습니다",
}
)
Functions ¶
func ReadChannel ¶
Read channel model from INI file. The data here is not yet validated.
func ReadClientID ¶
Types ¶
type DynamoDBConfig ¶
type DynamoDBConfig struct {
// contains filtered or unexported fields
}
func ReadDynamoDB ¶
func ReadDynamoDB(iniFile *ini.File) *DynamoDBConfig
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
func NewInstallerEng ¶
func NewInstallerEng() *Installer
func NewInstallerKor ¶
func NewInstallerKor() *Installer
func (*Installer) CreateHelixClient ¶
func (installer *Installer) CreateHelixClient(clientID string) (helix.HelixClientT, error)
func (*Installer) PopulateBotModel ¶
func (installer *Installer) PopulateBotModel( helixClient helix.HelixClientT, bot *models.Bot) error
Populate other fields of Bot model from config, by using Twitch Users API.
func (*Installer) PopulateChannelModel ¶
func (*Installer) TryAccessingChatServer ¶
func (*Installer) TryAccessingDynamoDB ¶
func (installer *Installer) TryAccessingDynamoDB(dbConfig *DynamoDBConfig) (*dynamo.DB, error)
Click to show internal directories.
Click to hide internal directories.