repos

package
v0.0.0-...-3ba6e34 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = readConfig()

Config represents config file as object

View Source
var Db = dbSession.DB(Config.DbName)

Db is database connection object

Functions

func AddBitsToUser

func AddBitsToUser(channelID *string, userID *string, user *string, amount int, reason string)

func AddFollowerToList

func AddFollowerToList(channelID *string, follower *string)

func AddSongRequest

func AddSongRequest(user *string, userIsSub bool, userID *string, channelID *string, videoID *string) error

func CheckIfFollowerGreeted

func CheckIfFollowerGreeted(channelID *string, follower *string) (bool, error)

func CloseActiveSubday

func CloseActiveSubday(channelID *string)

func CloseSubday

func CloseSubday(channelID *string, id *string)

func CreateAutoMessage

func CreateAutoMessage(autoMessageUpdate *models.AutoMessageUpdate) (*bson.ObjectId, error)

func CreateChannels

func CreateChannels()

func CreateNewSubday

func CreateNewSubday(channelID *string, subsOnly bool, name *string) bool

func DecrementAutoMessages

func DecrementAutoMessages(channelID *string)

func GetAutoMessage

func GetAutoMessage(id *string, channelID *string) (*models.AutoMessageWithHistory, error)

func GetAutoMessages

func GetAutoMessages(channelID *string) (*[]models.AutoMessageWithHistory, error)

func GetBitsForChannel

func GetBitsForChannel(channelID *string, pattern *string) (*[]models.UserBits, error)

func GetBitsForChannelUser

func GetBitsForChannelUser(channelID *string, userID *string) (*models.UserBitsWithHistory, error)

func GetChannelActiveTemplates

func GetChannelActiveTemplates(channelID *string) (*[]models.TemplateInfo, error)

func GetChannelAliasedTemplates

func GetChannelAliasedTemplates(channelID *string, aliasTo *string) ([]models.TemplateInfo, error)

func GetChannelBans

func GetChannelBans(channelID *string) (*models.ChannelBans, error)

func GetChannelInfo

func GetChannelInfo(channelID *string) (*models.ChannelInfo, error)

GetChannelInfo gets channel info

func GetChannelTemplate

func GetChannelTemplate(channelID *string, commandName *string) (models.TemplateInfo, error)

func GetChannelTemplateWithHistory

func GetChannelTemplateWithHistory(channelID *string, commandName *string) (*models.TemplateInfoWithHistory, error)

GetChannelTemplateWithHistory gets specific paginated

func GetChannelTemplates

func GetChannelTemplates(channelID *string) (*[]models.TemplateInfo, error)

func GetChannelUsers

func GetChannelUsers(channelID *string, pattern *string) (*[]models.ChannelUsers, error)

func GetChannelsWithExpiredSubtrain

func GetChannelsWithExpiredSubtrain() (*[]models.ChannelInfo, error)

func GetChannelsWithSubtrainNotification

func GetChannelsWithSubtrainNotification() (*[]models.ChannelInfo, error)

func GetCurrentAutoMessages

func GetCurrentAutoMessages() (*[]models.AutoMessage, error)

func GetDubTrackEnabledChannels

func GetDubTrackEnabledChannels() (*[]models.ChannelInfo, error)

func GetExpiredSongRequests

func GetExpiredSongRequests() (*[]models.SongRequest, error)

GetExpiredSongRequests checks for expired song requests to switch tracks then

func GetFollowerCursor

func GetFollowerCursor(channelID *string) (*models.FollowerCursor, error)

func GetIfSubToChannel

func GetIfSubToChannel(userID *string, channelID *string) (bool, bool)

GetIfSubToChannel is cache for checking if user subbed to channel

func GetLastActiveSubday

func GetLastActiveSubday(channelID *string) (*models.Subday, error)

func GetLastSubday

func GetLastSubday(channelID *string) (*models.SubdayNoWinners, error)

func GetLastSubdayMod

func GetLastSubdayMod(channelID *string) (*models.Subday, error)

func GetModChannels

func GetModChannels(userID *string) (*[]models.ChannelWithID, error)

func GetSongRequest

func GetSongRequest(channelID *string) *models.ChannelSongRequest

func GetStreamersID

func GetStreamersID() (*[]string, error)

func GetSubAlert

func GetSubAlert(channelID *string) (*models.SubAlert, error)

GetSubAlert ha

func GetSubAlertWithHistory

func GetSubAlertWithHistory(channelID *string) (*models.SubAlertWithHistory, error)

func GetSubdayById

func GetSubdayById(id *string) (*models.SubdayNoWinners, error)

func GetSubdayByIdMod

func GetSubdayByIdMod(id *string) (*models.Subday, error)

func GetSubdays

func GetSubdays(channelID *string) (*[]models.SubdayList, error)

func GetSubsForChannel

func GetSubsForChannel(channelID *string) (*[]models.SubscriptionInfo, error)

func GetSubsForChannelWithLimit

func GetSubsForChannelWithLimit(channelID *string, limit time.Time) (*[]models.SubscriptionInfo, error)

func GetTwitchDJEnabledChannels

func GetTwitchDJEnabledChannels() (*[]models.ChannelInfo, error)

func GetUserInfoByOauth

func GetUserInfoByOauth(oauthKey *string) (*models.HTTPSession, error)

func GetUserMessageHistoryByKnownUsernames

func GetUserMessageHistoryByKnownUsernames(user *string, channelID *string) (*[]models.ChatMessageLog, error)

func GetUserMessageHistoryByUserID

func GetUserMessageHistoryByUserID(userID *string, channelID *string) (*models.ChatMessageLog, error)

func GetUserMessageHistoryByUsername

func GetUserMessageHistoryByUsername(user *string, channelID *string) (*models.ChatMessageLog, error)

func GetUsernameByID

func GetUsernameByID(userID *string) (*string, error)

func GetUsersID

func GetUsersID(users *[]string) (*map[string]string, error)

func GetVKEnabledChannels

func GetVKEnabledChannels() (*[]models.ChannelInfo, error)

func GetYoutubeVideoInfo

func GetYoutubeVideoInfo(id *string) (*models.YoutubeVideo, error)

func IncrementSubtrainCounter

func IncrementSubtrainCounter(channelInfo *models.ChannelInfo, user *string)

func IncrementSubtrainCounterByChannelID

func IncrementSubtrainCounterByChannelID(channelID *string, user *string)

func LogChannelBan

func LogChannelBan(userID *string, user *string, channelID *string, duration *int)

func LogMessage

func LogMessage(message *models.ChatMessage)

LogMessage logs the chat message

func LogSubscription

func LogSubscription(info *models.SubscriptionInfo)

func PickRandomWinnerForSubday

func PickRandomWinnerForSubday(channelID *string, id *string) *models.SubdayRecord

func PullLastUserSongRequest

func PullLastUserSongRequest(channelID *string, userID *string)

func PullSongRequest

func PullSongRequest(channelID *string, videoID *string)

func PullUserSongRequest

func PullUserSongRequest(channelID *string, videoID *string, userID *string)

func PushCommandsForChannel

func PushCommandsForChannel(channelID *string)

func PushDubTrack

func PushDubTrack(channelID *string, dubTrack *models.DubTrack)

PushDubTrack updates stream DubTrack status (is it playing or is there any songs)

func PushMods

func PushMods(channelID *string, mods *[]string)

PushMods updates list of mods on channel

func PushSongRequest

func PushSongRequest(channelID *string, request *models.SongRequest)

func PushSongRequestSettings

func PushSongRequestSettings(channelID *string, settings *models.ChannelSongRequestSettings)

func PushStreamStatus

func PushStreamStatus(channelID *string, streamStatus *models.StreamStatus)

PushStreamStatus updates stream status (start of stream, topic of stream)

func PushTwitchDJ

func PushTwitchDJ(channelID *string, twitchDJ *models.TwitchDJ)

PushTwitchDJ updates stream twitchDJ status (is it playing or is there any songs)

func PushVkGroupInfo

func PushVkGroupInfo(channelID *string, vkGroupInfo *models.VkGroupInfo)

func PushWinners

func PushWinners(id bson.ObjectId, winners *[]models.SubdayRecord)

func PutChannelSubtrain

func PutChannelSubtrain(channelID *string, subTrain *models.SubTrain)

func PutChannelSubtrainWeb

func PutChannelSubtrainWeb(channelID *string, subTrain *models.SubTrain)

func PutSubscriptionBits

func PutSubscriptionBits(channelID *string, userID *string, user *string, subPlan *string)

func RemoveInactiveAutoMessages

func RemoveInactiveAutoMessages(channelID *string)

func ResetAutoMessageThreshold

func ResetAutoMessageThreshold(autoMessage *models.AutoMessage)

func ResetSubtrainCounter

func ResetSubtrainCounter(channelInfo *models.ChannelInfo)

func SetChannelTemplate

func SetChannelTemplate(user *string, userID *string, channelID *string, commandName *string, template *models.TemplateInfoBody) error

func SetChannelTemplateAlias

func SetChannelTemplateAlias(user *string, userID *string, channelID *string, commandName *string, aliasTo *string)

func SetFollowerCursor

func SetFollowerCursor(channelID *string, cursor *string)

func SetIfSubToChannel

func SetIfSubToChannel(userID *string, channelID *string, isSubbed *bool)

SetIfSubToChannel is cache for checking if user subbed to channel

func SetSubdayIsActive

func SetSubdayIsActive(channelID *string, isActive bool)

func SetSubtrainNotificationShown

func SetSubtrainNotificationShown(channelInfo *models.ChannelInfo)

func SubdayPullWinner

func SubdayPullWinner(id *string, user *string)

func UpdateAutoMessage

func UpdateAutoMessage(autoMessageUpdate *models.AutoMessageUpdate) error

func VoteForSubday

func VoteForSubday(user *string, userID *string, id *bson.ObjectId, game *string)

Types

type SubAlertValidation

type SubAlertValidation struct {
	Error           bool `json:"error"`
	PrimeError      bool `json:"primeError"`
	FiveError       bool `json:"fiveError"`
	TenError        bool `json:"tenError"`
	TwentyFiveError bool `json:"twentyFiveError"`
}

func SetSubAlert

func SetSubAlert(user *string, userID *string, subAlert *models.SubAlert) *SubAlertValidation

SetSubAlert updates stream status (start of stream, topic of stream)

Jump to

Keyboard shortcuts

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