Documentation ¶
Index ¶
- Variables
- func AddBitsToUser(channelID *string, userID *string, user *string, amount int, reason string)
- func AddFollowerToList(channelID *string, follower *string)
- func AddSongRequest(user *string, userIsSub bool, userID *string, channelID *string, ...) error
- func CheckIfFollowerGreeted(channelID *string, follower *string) (bool, error)
- func CloseActiveSubday(channelID *string)
- func CloseSubday(channelID *string, id *string)
- func CreateAutoMessage(autoMessageUpdate *models.AutoMessageUpdate) (*bson.ObjectId, error)
- func CreateChannels()
- func CreateNewSubday(channelID *string, subsOnly bool, name *string) bool
- func DecrementAutoMessages(channelID *string)
- func GetAutoMessage(id *string, channelID *string) (*models.AutoMessageWithHistory, error)
- func GetAutoMessages(channelID *string) (*[]models.AutoMessageWithHistory, error)
- func GetBitsForChannel(channelID *string, pattern *string) (*[]models.UserBits, error)
- func GetBitsForChannelUser(channelID *string, userID *string) (*models.UserBitsWithHistory, error)
- func GetChannelActiveTemplates(channelID *string) (*[]models.TemplateInfo, error)
- func GetChannelAliasedTemplates(channelID *string, aliasTo *string) ([]models.TemplateInfo, error)
- func GetChannelBans(channelID *string) (*models.ChannelBans, error)
- func GetChannelInfo(channelID *string) (*models.ChannelInfo, error)
- func GetChannelTemplate(channelID *string, commandName *string) (models.TemplateInfo, error)
- func GetChannelTemplateWithHistory(channelID *string, commandName *string) (*models.TemplateInfoWithHistory, error)
- func GetChannelTemplates(channelID *string) (*[]models.TemplateInfo, error)
- func GetChannelUsers(channelID *string, pattern *string) (*[]models.ChannelUsers, error)
- func GetChannelsWithExpiredSubtrain() (*[]models.ChannelInfo, error)
- func GetChannelsWithSubtrainNotification() (*[]models.ChannelInfo, error)
- func GetCurrentAutoMessages() (*[]models.AutoMessage, error)
- func GetDubTrackEnabledChannels() (*[]models.ChannelInfo, error)
- func GetExpiredSongRequests() (*[]models.SongRequest, error)
- func GetFollowerCursor(channelID *string) (*models.FollowerCursor, error)
- func GetIfSubToChannel(userID *string, channelID *string) (bool, bool)
- func GetLastActiveSubday(channelID *string) (*models.Subday, error)
- func GetLastSubday(channelID *string) (*models.SubdayNoWinners, error)
- func GetLastSubdayMod(channelID *string) (*models.Subday, error)
- func GetModChannels(userID *string) (*[]models.ChannelWithID, error)
- func GetSongRequest(channelID *string) *models.ChannelSongRequest
- func GetStreamersID() (*[]string, error)
- func GetSubAlert(channelID *string) (*models.SubAlert, error)
- func GetSubAlertWithHistory(channelID *string) (*models.SubAlertWithHistory, error)
- func GetSubdayById(id *string) (*models.SubdayNoWinners, error)
- func GetSubdayByIdMod(id *string) (*models.Subday, error)
- func GetSubdays(channelID *string) (*[]models.SubdayList, error)
- func GetSubsForChannel(channelID *string) (*[]models.SubscriptionInfo, error)
- func GetSubsForChannelWithLimit(channelID *string, limit time.Time) (*[]models.SubscriptionInfo, error)
- func GetTwitchDJEnabledChannels() (*[]models.ChannelInfo, error)
- func GetUserInfoByOauth(oauthKey *string) (*models.HTTPSession, error)
- func GetUserMessageHistoryByKnownUsernames(user *string, channelID *string) (*[]models.ChatMessageLog, error)
- func GetUserMessageHistoryByUserID(userID *string, channelID *string) (*models.ChatMessageLog, error)
- func GetUserMessageHistoryByUsername(user *string, channelID *string) (*models.ChatMessageLog, error)
- func GetUsernameByID(userID *string) (*string, error)
- func GetUsersID(users *[]string) (*map[string]string, error)
- func GetVKEnabledChannels() (*[]models.ChannelInfo, error)
- func GetYoutubeVideoInfo(id *string) (*models.YoutubeVideo, error)
- func IncrementSubtrainCounter(channelInfo *models.ChannelInfo, user *string)
- func IncrementSubtrainCounterByChannelID(channelID *string, user *string)
- func LogChannelBan(userID *string, user *string, channelID *string, duration *int)
- func LogMessage(message *models.ChatMessage)
- func LogSubscription(info *models.SubscriptionInfo)
- func PickRandomWinnerForSubday(channelID *string, id *string) *models.SubdayRecord
- func PullLastUserSongRequest(channelID *string, userID *string)
- func PullSongRequest(channelID *string, videoID *string)
- func PullUserSongRequest(channelID *string, videoID *string, userID *string)
- func PushCommandsForChannel(channelID *string)
- func PushDubTrack(channelID *string, dubTrack *models.DubTrack)
- func PushMods(channelID *string, mods *[]string)
- func PushSongRequest(channelID *string, request *models.SongRequest)
- func PushSongRequestSettings(channelID *string, settings *models.ChannelSongRequestSettings)
- func PushStreamStatus(channelID *string, streamStatus *models.StreamStatus)
- func PushTwitchDJ(channelID *string, twitchDJ *models.TwitchDJ)
- func PushVkGroupInfo(channelID *string, vkGroupInfo *models.VkGroupInfo)
- func PushWinners(id bson.ObjectId, winners *[]models.SubdayRecord)
- func PutChannelSubtrain(channelID *string, subTrain *models.SubTrain)
- func PutChannelSubtrainWeb(channelID *string, subTrain *models.SubTrain)
- func PutSubscriptionBits(channelID *string, userID *string, user *string, subPlan *string)
- func RemoveInactiveAutoMessages(channelID *string)
- func ResetAutoMessageThreshold(autoMessage *models.AutoMessage)
- func ResetSubtrainCounter(channelInfo *models.ChannelInfo)
- func SetChannelTemplate(user *string, userID *string, channelID *string, commandName *string, ...) error
- func SetChannelTemplateAlias(user *string, userID *string, channelID *string, commandName *string, ...)
- func SetFollowerCursor(channelID *string, cursor *string)
- func SetIfSubToChannel(userID *string, channelID *string, isSubbed *bool)
- func SetSubdayIsActive(channelID *string, isActive bool)
- func SetSubtrainNotificationShown(channelInfo *models.ChannelInfo)
- func SubdayPullWinner(id *string, user *string)
- func UpdateAutoMessage(autoMessageUpdate *models.AutoMessageUpdate) error
- func VoteForSubday(user *string, userID *string, id *bson.ObjectId, game *string)
- type SubAlertValidation
Constants ¶
This section is empty.
Variables ¶
var Config = readConfig()
Config represents config file as object
var Db = dbSession.DB(Config.DbName)
Db is database connection object
Functions ¶
func AddBitsToUser ¶
func AddFollowerToList ¶
func AddSongRequest ¶
func CheckIfFollowerGreeted ¶
func CloseActiveSubday ¶
func CloseActiveSubday(channelID *string)
func CloseSubday ¶
func CreateAutoMessage ¶
func CreateAutoMessage(autoMessageUpdate *models.AutoMessageUpdate) (*bson.ObjectId, error)
func CreateChannels ¶
func CreateChannels()
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 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 ¶
GetIfSubToChannel is cache for checking if user subbed to channel
func GetLastSubday ¶
func GetLastSubday(channelID *string) (*models.SubdayNoWinners, error)
func GetModChannels ¶
func GetModChannels(userID *string) (*[]models.ChannelWithID, error)
func GetSongRequest ¶
func GetSongRequest(channelID *string) *models.ChannelSongRequest
func GetStreamersID ¶
func GetSubAlertWithHistory ¶
func GetSubAlertWithHistory(channelID *string) (*models.SubAlertWithHistory, error)
func GetSubdayById ¶
func GetSubdayById(id *string) (*models.SubdayNoWinners, error)
func GetSubdays ¶
func GetSubdays(channelID *string) (*[]models.SubdayList, error)
func GetSubsForChannel ¶
func GetSubsForChannel(channelID *string) (*[]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 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 LogChannelBan ¶
func LogSubscription ¶
func LogSubscription(info *models.SubscriptionInfo)
func PickRandomWinnerForSubday ¶
func PickRandomWinnerForSubday(channelID *string, id *string) *models.SubdayRecord
func PullLastUserSongRequest ¶
func PullSongRequest ¶
func PullUserSongRequest ¶
func PushCommandsForChannel ¶
func PushCommandsForChannel(channelID *string)
func PushDubTrack ¶
PushDubTrack updates stream DubTrack status (is it playing or is there any songs)
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 ¶
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 PutChannelSubtrainWeb ¶
func PutSubscriptionBits ¶
func RemoveInactiveAutoMessages ¶
func RemoveInactiveAutoMessages(channelID *string)
func ResetAutoMessageThreshold ¶
func ResetAutoMessageThreshold(autoMessage *models.AutoMessage)
func ResetSubtrainCounter ¶
func ResetSubtrainCounter(channelInfo *models.ChannelInfo)
func SetChannelTemplate ¶
func SetChannelTemplateAlias ¶
func SetFollowerCursor ¶
func SetIfSubToChannel ¶
SetIfSubToChannel is cache for checking if user subbed to channel
func SetSubdayIsActive ¶
func SetSubtrainNotificationShown ¶
func SetSubtrainNotificationShown(channelInfo *models.ChannelInfo)
func SubdayPullWinner ¶
func UpdateAutoMessage ¶
func UpdateAutoMessage(autoMessageUpdate *models.AutoMessageUpdate) error
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)
Source Files ¶
- autoMessage.go
- bits.go
- cache.go
- channelBans.go
- channelInfo.go
- channelInfoRepository.go
- config.go
- createChannels.go
- db.go
- followerCursor.go
- followerList.go
- getChannelUsers.go
- getExpiredSongRequests.go
- getIfSubToChannel.go
- getStreamersID.go
- getSubAlert.go
- getTwitchDJEnabledChannels.go
- getUserInfoByOauth.go
- getUserMessageHistory.go
- getUsersID.go
- logMessage.go
- pushCommandsForChannel.go
- pushDubTrack.go
- pushMods.go
- pushStreamStatus.go
- pushTwitchDJ.go
- putChannelTemplate.go
- setIfSubToChannel.go
- setSubAlert.go
- songRequest.go
- subDay.go
- subTrain.go
- subscriptionInfo.go
- template.go
- vkGroup.go