install

package
v0.0.0-...-a9e5fbf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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 ReadBot

func ReadBot(iniFile *ini.File) *models.Bot

Read bot model from INI file. The data here is not yet validated.

func ReadChannel

func ReadChannel(iniFile *ini.File) *models.Channel

Read channel model from INI file. The data here is not yet validated.

func ReadClientID

func ReadClientID(iniFile *ini.File) string

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) Install

func (installer *Installer) Install() 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 *Installer) PopulateChannelModel(
	helixClient helix.HelixClientT, channel *models.Channel) error

func (*Installer) TryAccessingChatServer

func (installer *Installer) TryAccessingChatServer(bot *models.Bot) error

func (*Installer) TryAccessingDynamoDB

func (installer *Installer) TryAccessingDynamoDB(dbConfig *DynamoDBConfig) (*dynamo.DB, error)

type InstallerMessages

type InstallerMessages struct {
	NoHelixClient                string
	TwitchUsersAPIError          string
	TwitchBotAccountNotFound     string
	TwitchChannelAccountNotFound string
	ChatServerSuccessfulLogin    string
	ChatServerFailedLogin        string
	DynamoDBConnectionError      string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL