Documentation ¶
Overview ¶
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reseved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
- Constants
- type AuthenticationClient
- type Authorization
- type Ban
- type BanActionEvent
- type BanEvent
- type Block
- type CLIDatabase
- type Category
- type ChannelPointsRedemption
- type ChannelPointsRedemptionRewardInfo
- type ChannelPointsReward
- type ChatSettings
- type Clip
- type DBResponse
- type DefaultImage
- type DropsEntitlement
- type Editor
- type EventCacheParameters
- type EventCacheResponse
- type Follow
- type GlobalCooldown
- type InternalCursor
- type InternalPagination
- type MaxPerStream
- type MaxPerUserPerStream
- type Moderator
- type ModeratorAction
- type ModeratorActionEvent
- type Poll
- type PollsChoice
- type Prediction
- type PredictionOutcome
- type PredictionPrediction
- type Query
- func (q *Query) AddBlock(p UserRequestParams) error
- func (q *Query) AddEditor(p UserRequestParams) error
- func (q *Query) AddFollow(p UserRequestParams) error
- func (q *Query) AddModerator(p UserRequestParams) error
- func (q *Query) AddVIP(p UserRequestParams) error
- func (q *Query) CreateAuthorization(a Authorization) (Authorization, error)
- func (q *Query) DeleteBan(p UserRequestParams) error
- func (q *Query) DeleteBlock(from_user string, to_user string) error
- func (q *Query) DeleteChannelPointsReward(id string) error
- func (q *Query) DeleteFollow(from_user string, to_user string) error
- func (q *Query) DeleteSegment(id string, broadcasterID string) error
- func (q *Query) DeleteVIP(broadcaster string, user string) error
- func (q *Query) DeleteVideo(id string) error
- func (q *Query) GetAuthenticationClient(ac AuthenticationClient) (*DBResponse, error)
- func (q *Query) GetAuthorizationByToken(token string) (Authorization, error)
- func (q *Query) GetBanEvents(p UserRequestParams) (*DBResponse, error)
- func (q *Query) GetBans(p UserRequestParams) (*DBResponse, error)
- func (q *Query) GetBlocks(p UserRequestParams) (*DBResponse, error)
- func (q *Query) GetCategories(cat Category) (*DBResponse, error)
- func (q *Query) GetChannelPointsRedemption(cpr ChannelPointsRedemption, sort string) (*DBResponse, error)
- func (q *Query) GetChannelPointsReward(cpr ChannelPointsReward) (*DBResponse, error)
- func (q *Query) GetChannels(u User) (*DBResponse, error)
- func (q *Query) GetChatSettingsByBroadcaster(broadcaster string) (*DBResponse, error)
- func (q *Query) GetClips(c Clip, startDate string, endDate string) (*DBResponse, error)
- func (q *Query) GetDropsEntitlements(de DropsEntitlement) (*DBResponse, error)
- func (q *Query) GetEditors(u User) (*DBResponse, error)
- func (q *Query) GetEventByID(id string) (EventCacheResponse, error)
- func (q *Query) GetFollowedStreams(userID string) (*DBResponse, error)
- func (q *Query) GetFollows(p UserRequestParams, totalsFromUser bool) (*DBResponse, error)
- func (q *Query) GetModerationActionsByBroadcaster(broadcaster string) (*DBResponse, error)
- func (q *Query) GetModeratorEvents(p UserRequestParams) (*DBResponse, error)
- func (q *Query) GetModerators(p UserRequestParams) (*DBResponse, error)
- func (q *Query) GetModeratorsForBroadcaster(broadcasterID string) (*DBResponse, error)
- func (q *Query) GetPolls(p Poll) (*DBResponse, error)
- func (q *Query) GetPredictions(p Prediction) (*DBResponse, error)
- func (q *Query) GetSchedule(p ScheduleSegment, startTime time.Time) (*DBResponse, error)
- func (q *Query) GetStream(s Stream) (*DBResponse, error)
- func (q *Query) GetStreamMarkers(sm StreamMarker) (*DBResponse, error)
- func (q *Query) GetSubscriptions(s Subscription) (*DBResponse, error)
- func (q *Query) GetTags(t Tag) (*DBResponse, error)
- func (q *Query) GetTeam(t Team) (*DBResponse, error)
- func (q *Query) GetTeamByBroadcaster(broadcasterID string) (*DBResponse, error)
- func (q *Query) GetTopGames() (*DBResponse, error)
- func (q *Query) GetUser(u User) (User, error)
- func (q *Query) GetUsers(u User) (*DBResponse, error)
- func (q *Query) GetVIPsByBroadcaster(broadcaster string) (*DBResponse, error)
- func (q *Query) GetVacations(p ScheduleSegment) (ScheduleVacation, error)
- func (q *Query) GetVideos(v Video, period string, sort string) (*DBResponse, error)
- func (q *Query) InsertBan(p UserRequestParams) error
- func (q *Query) InsertCategory(category Category, upsert bool) error
- func (q *Query) InsertChannelPointsRedemption(r ChannelPointsRedemption) error
- func (q *Query) InsertChannelPointsReward(r ChannelPointsReward) error
- func (q *Query) InsertChatSettings(s ChatSettings) error
- func (q *Query) InsertClip(c Clip) error
- func (q *Query) InsertDropsEntitlement(d DropsEntitlement) error
- func (q *Query) InsertIntoDB(p EventCacheParameters) error
- func (q *Query) InsertMutedSegmentsForVideo(vms VideoMutedSegment) error
- func (q *Query) InsertOrUpdateAuthenticationClient(client AuthenticationClient, upsert bool) (AuthenticationClient, error)
- func (q *Query) InsertPoll(p Poll) error
- func (q *Query) InsertPrediction(p Prediction) error
- func (q *Query) InsertPredictionPrediction(p PredictionPrediction) error
- func (q *Query) InsertSchedule(p ScheduleSegment) error
- func (q *Query) InsertStream(p Stream, upsert bool) error
- func (q *Query) InsertStreamMarker(sm StreamMarker) error
- func (q *Query) InsertSubscription(s SubscriptionInsert) error
- func (q *Query) InsertTag(t Tag) error
- func (q *Query) InsertTeam(t Team) error
- func (q *Query) InsertTeamMember(tm TeamMember) error
- func (q *Query) InsertUser(u User, upsert bool) error
- func (q *Query) InsertVideo(v Video) error
- func (q *Query) RemoveModerator(broadcaster string, user string) error
- func (q *Query) SearchCategories(query string) (*DBResponse, error)
- func (q *Query) SearchChannels(query string, live_only bool) (*DBResponse, error)
- func (q *Query) UpdateChannel(id string, u User) error
- func (q *Query) UpdateChannelPointsRedemption(r ChannelPointsRedemption) error
- func (q *Query) UpdateChannelPointsReward(r ChannelPointsReward) error
- func (q *Query) UpdateChatSettings(s ChatSettings) error
- func (q *Query) UpdateDropsEntitlement(d DropsEntitlement) error
- func (q *Query) UpdatePoll(p Poll) error
- func (q *Query) UpdatePollChoice(p PollsChoice) error
- func (q *Query) UpdatePrediction(p Prediction) error
- func (q *Query) UpdateSegment(p ScheduleSegment) error
- type Schedule
- type ScheduleSegment
- type ScheduleVacation
- type SearchChannel
- type SegmentCategory
- type Stream
- type StreamMarker
- type StreamMarkerUser
- type StreamMarkerVideo
- type Subscription
- type SubscriptionInsert
- type Tag
- type Team
- type TeamMember
- type User
- type UserRequestParams
- type VIP
- type Video
- type VideoMutedSegment
Constants ¶
const BAN_ADD = "moderation.user.ban"
const BAN_REMOVE = "moderation.user.unban"
const MOD_ADD = "moderation.moderator.add"
const MOD_REMOVE = "moderation.moderator.remove"
const SEP_AND = "and"
const SEP_OR = "or"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationClient ¶
type Authorization ¶
type Ban ¶
type Ban struct { UserID string `db:"user_id" json:"user_id"` UserLogin string `db:"user_login" json:"user_login"` UserName string `db:"user_name" json:"user_name"` ExpiresAt *string `db:"expires_at" json:"expires_at"` CreatedAt string `db:"created_at" json:"created_at"` Reason string `json:"reason"` ModeratorID string `json:"moderator_id"` ModeratorUserLogin string `json:"moderator_login"` ModeratorUserName string `json:"moderator_name"` }
type BanActionEvent ¶
type BanActionEvent struct { BroadcasterID string `db:"broadcaster_id" json:"broadcaster_id"` BroadcasterLogin string `db:"broadcaster_login" json:"broadcaster_login"` BroadcasterName string `db:"broadcaster_name" json:"broadcaster_name"` UserID string `db:"user_id" json:"user_id"` UserLogin string `db:"user_login" json:"user_login"` UserName string `db:"user_name" json:"user_name"` ExpiresAt *string `db:"expires_at" json:"expires_at"` Reason string `json:"reason"` ModeratorID string `json:"moderator_id"` ModeratorUserLogin string `json:"moderator_login"` ModeratorUserName string `json:"moderator_name"` }
type BanEvent ¶
type BanEvent struct { ID string `db:"id" json:"id"` EventType string `db:"event_type" json:"event_type"` EventTimestamp string `db:"event_timestamp" json:"event_timestamp"` EventVersion string `db:"event_version" json:"version"` BanActionEvent `json:"event_data"` }
type CLIDatabase ¶
func NewConnection ¶
func NewConnection(extendedBusyTimeout bool) (CLIDatabase, error)
func (CLIDatabase) IsFirstRun ¶
func (c CLIDatabase) IsFirstRun() bool
func (CLIDatabase) NewQuery ¶
func (c CLIDatabase) NewQuery(r *http.Request, max_limit int) *Query
NewQuery handles the logic for generating the pagination token to pass alongside the DB queries for easier access
func (CLIDatabase) NewQueryWithDefaultLimit ¶ added in v1.1.16
type ChannelPointsRedemption ¶
type ChannelPointsRedemption struct { ID string `db:"id" json:"id" dbs:"cpr.id"` BroadcasterID string `db:"broadcaster_id" json:"broadcaster_id" dbs:"cpr.broadcaster_id"` BroadcasterLogin string `db:"broadcaster_login" dbi:"false" json:"broadcaster_login"` BroadcasterName string `db:"broadcaster_name" dbi:"false" json:"broadcaster_name"` UserID string `db:"user_id" json:"user_id"` UserLogin string `db:"user_login" dbi:"false" json:"user_login"` UserName string `db:"user_name" dbi:"false" json:"user_name"` UserInput sql.NullString `db:"user_input" json:"-"` RealUserInput string `json:"user_input"` RedemptionStatus string `db:"redemption_status" json:"status"` RedeemedAt string `db:"redeemed_at" json:"redeemed_at"` RewardID string `db:"reward_id" json:"-"` ChannelPointsRedemptionRewardInfo `json:"reward"` }
type ChannelPointsReward ¶
type ChannelPointsReward struct { ID string `db:"id" json:"id" dbs:"cpr.id"` BroadcasterID string `db:"broadcaster_id" json:"broadcaster_id"` BroadcasterLogin string `db:"broadcaster_login" dbi:"false" json:"broadcaster_login"` BroadcasterName string `db:"broadcaster_name" dbi:"false" json:"broadcaster_name"` RewardImage sql.NullString `db:"reward_image" json:"-"` RealRewardImage *string `json:"image"` BackgroundColor string `db:"background_color" json:"background_color"` IsEnabled *bool `db:"is_enabled" json:"is_enabled"` Cost *int `db:"cost" json:"cost"` Title string `db:"title" dbs:"cpr.title" json:"title"` RewardPrompt string `db:"reward_prompt" json:"prompt"` IsUserInputRequired bool `db:"is_user_input_required" json:"is_user_input_required"` MaxPerStream `json:"max_per_stream_setting"` MaxPerUserPerStream `json:"max_per_user_per_stream_setting"` GlobalCooldown `json:"global_cooldown_setting"` IsPaused bool `db:"is_paused" json:"is_paused"` IsInStock bool `db:"is_in_stock" json:"is_in_stock"` DefaultImage `dbi:"false" json:"default_image"` ShouldRedemptionsSkipQueue bool `db:"should_redemptions_skip_queue" json:"should_redemptions_skip_request_queue"` RedemptionsRedeemedCurrentStream *int `db:"redemptions_redeemed_current_stream" json:"redemptions_redeemed_current_stream"` CooldownExpiresAt sql.NullString `db:"cooldown_expires_at" json:"-"` RealCooldownExpiresAt *string `json:"cooldown_expires_at"` }
type ChatSettings ¶ added in v1.1.16
type ChatSettings struct { BroadcasterID string `db:"broadcaster_id" json:"broadcaster_id"` SlowMode *bool `db:"slow_mode" json:"slow_mode"` SlowModeWaitTime *int `db:"slow_mode_wait_time" json:"slow_mode_wait_time"` FollowerMode *bool `db:"follower_mode" json:"follower_mode"` FollowerModeDuration *int `db:"follower_mode_duration" json:"follower_mode_duration"` SubscriberMode *bool `db:"subscriber_mode" json:"subscriber_mode"` EmoteMode *bool `db:"emote_mode" json:"emote_mode"` UniqueChatMode *bool `db:"unique_chat_mode" json:"unique_chat_mode"` NonModeratorChatDelay *bool `db:"non_moderator_chat_delay" json:"non_moderator_chat_delay"` NonModeratorChatDelayDuration *int `db:"non_moderator_chat_delay_duration" json:"non_moderator_chat_delay_duration"` // Shield mode ShieldModeIsActive bool `db:"shieldmode_is_active" json:"-"` ShieldModeModeratorID string `db:"shieldmode_moderator_id" json:"-"` ShieldModeModeratorLogin string `db:"shieldmode_moderator_login" json:"-"` ShieldModeModeratorName string `db:"shieldmode_moderator_name" json:"-"` ShieldModeLastActivated string `db:"shieldmode_last_activated" json:"-"` }
type Clip ¶
type Clip struct { ID string `db:"id" json:"id" dbs:"c.id"` BroadcasterID string `db:"broadcaster_id" json:"broadcaster_id"` BroadcasterName string `db:"broadcaster_name" json:"broadcaster_name" dbi:"false"` CreatorID string `db:"creator_id" json:"creator_id"` CreatorName string `db:"creator_name" json:"creator_name" dbi:"false"` VideoID string `db:"video_id" json:"video_id"` GameID string `db:"game_id" json:"game_id"` Language string `db:"language" dbi:"false" json:"language"` Title string `db:"title" json:"title"` ViewCount int `db:"view_count" json:"view_count"` CreatedAt string `db:"created_at" json:"created_at"` Duration float64 `db:"duration" json:"duration"` VodOffset int `db:"vod_offset" json:"vod_offset"` IsFeatured bool `json:"is_featured"` // calculated fields URL string `json:"url"` ThumbnailURL string `json:"thumbnail_url"` EmbedURL string `json:"embed_url"` StartedAt string `db:"started_at" dbi:"false" json:"-"` EndedAt string `db:"ended_at" dbi:"false" json:"-"` }
type DBResponse ¶
type DefaultImage ¶
type DropsEntitlement ¶
type DropsEntitlement struct { ID string `db:"id" json:"id" dbs:"de.id"` UserID string `db:"user_id" json:"user_id"` BenefitID string `db:"benefit_id" json:"benefit_id"` GameID string `db:"game_id" json:"game_id"` Timestamp string `db:"timestamp" json:"timestamp"` Status string `db:"status" json:"fulfillment_status"` LastUpdated string `db:"last_updated" json:"last_updated"` }
type EventCacheParameters ¶
type EventCacheParameters struct { ID string `db:"id"` Event string `db:"event"` JSON string `db:"json"` FromUser string `db:"from_user"` ToUser string `db:"to_user"` Transport string `db:"transport"` Timestamp string `db:"timestamp"` }
EventCacheParameters is used to define required parameters when writing into the database
type EventCacheResponse ¶
type EventCacheResponse struct { ID string Event string JSON string Transport string Timestamp string }
EventCacheResponse is used to define the response coming from a SELECT-based function
type GlobalCooldown ¶
type InternalCursor ¶
type InternalPagination ¶
type InternalPagination struct { SQL string InternalCursor PaginationCursor string }
type MaxPerStream ¶
type MaxPerUserPerStream ¶
type ModeratorAction ¶
type ModeratorAction struct { ID string `db:"id" json:"id"` EventType string `db:"event_type" json:"event_type"` EventTimestamp string `db:"event_timestamp" json:"event_timestamp"` EventVersion string `db:"event_version" json:"version"` ModeratorActionEvent `json:"event_data"` }
type ModeratorActionEvent ¶
type ModeratorActionEvent struct { BroadcasterID string `db:"broadcaster_id" json:"broadcaster_id"` BroadcasterLogin string `db:"broadcaster_login" json:"broadcaster_login"` BroadcasterName string `db:"broadcaster_name" json:"broadcaster_name"` UserID string `db:"user_id" json:"user_id"` UserLogin string `db:"user_login" json:"user_login"` UserName string `db:"user_name" json:"user_name"` }
type Poll ¶
type Poll struct { ID string `db:"id" dbs:"p.id" json:"id"` BroadcasterID string `db:"broadcaster_id" dbs:"u1.id" json:"broadcaster_id"` BroadcasterLogin string `db:"broadcaster_login" dbi:"false" json:"broadcaster_login"` BroadcasterName string `db:"broadcaster_name" dbi:"false" json:"broadcaster_name"` Title string `db:"title" dbs:"p.title" json:"title"` BitsVotingEnabled bool `db:"bits_voting_enabled" json:"bits_voting_enabled"` BitsPerVote int `db:"bits_per_vote" json:"bits_per_vote"` ChannelPointsVotingEnabled bool `db:"channel_points_voting_enabled" json:"channel_points_voting_enabled"` ChannelPointsPerVote int `db:"channel_points_per_vote" json:"channel_points_per_vote"` Status string `db:"status" json:"status"` Duration int `db:"duration" json:"duration"` StartedAt string `db:"started_at" json:"started_at"` EndedAt string `db:"ended_at" json:"ended_at,omitempty"` Choices []PollsChoice `json:"choices"` }
type PollsChoice ¶
type Prediction ¶
type Prediction struct { ID string `db:"id" dbs:"p.id" json:"id"` BroadcasterID string `db:"broadcaster_id" dbs:"u1.id" json:"broadcaster_id"` BroadcasterLogin string `db:"broadcaster_login" dbi:"false" json:"broadcaster_login"` BroadcasterName string `db:"broadcaster_name" dbi:"false" json:"broadcaster_name"` Title string `db:"title" json:"title"` WinningOutcomeID *string `db:"winning_outcome_id" json:"winning_outcome_id"` PredictionWindow int `db:"prediction_window" json:"prediction_window"` Status string `db:"status" json:"status"` StartedAt string `db:"created_at" json:"created_at"` EndedAt *string `db:"ended_at" json:"ended_at"` LockedAt *string `db:"locked_at" json:"locked_at"` Outcomes []PredictionOutcome `json:"outcomes"` }
type PredictionOutcome ¶
type PredictionOutcome struct { ID string `db:"id" dbs:"po.id" json:"id"` Title string `db:"title" json:"title"` Users int `db:"users" json:"users"` ChannelPoints int `db:"channel_points" json:"channel_points"` TopPredictors []*PredictionPrediction `json:"top_predictors"` Color string `db:"color" json:"color"` PredictionID string `db:"prediction_id" json:"-"` }
type PredictionPrediction ¶
type PredictionPrediction struct { PredictionID string `db:"prediction_id" json:"-"` UserID string `db:"user_id" json:"user_id"` UserLogin string `db:"user_login" dbi:"false" json:"user_login"` UserName string `db:"user_name" dbi:"false" json:"user_name"` Amount int `db:"amount" json:"channel_points_used"` OutcomeID string `db:"outcome_id" json:"-"` // calculated fields AmountWon int `json:"channel_points_won"` }
type Query ¶
type Query struct { Limit int Cursor string InternalPagination DB *sqlx.DB }
func (*Query) AddBlock ¶
func (q *Query) AddBlock(p UserRequestParams) error
func (*Query) AddEditor ¶
func (q *Query) AddEditor(p UserRequestParams) error
func (*Query) AddFollow ¶
func (q *Query) AddFollow(p UserRequestParams) error
func (*Query) AddModerator ¶
func (q *Query) AddModerator(p UserRequestParams) error
func (*Query) AddVIP ¶ added in v1.1.16
func (q *Query) AddVIP(p UserRequestParams) error
func (*Query) CreateAuthorization ¶
func (q *Query) CreateAuthorization(a Authorization) (Authorization, error)
func (*Query) DeleteBan ¶ added in v1.1.16
func (q *Query) DeleteBan(p UserRequestParams) error
func (*Query) DeleteChannelPointsReward ¶
func (*Query) DeleteVideo ¶
func (*Query) GetAuthenticationClient ¶
func (q *Query) GetAuthenticationClient(ac AuthenticationClient) (*DBResponse, error)
func (*Query) GetAuthorizationByToken ¶
func (q *Query) GetAuthorizationByToken(token string) (Authorization, error)
func (*Query) GetBanEvents ¶
func (q *Query) GetBanEvents(p UserRequestParams) (*DBResponse, error)
func (*Query) GetBans ¶
func (q *Query) GetBans(p UserRequestParams) (*DBResponse, error)
func (*Query) GetBlocks ¶
func (q *Query) GetBlocks(p UserRequestParams) (*DBResponse, error)
func (*Query) GetCategories ¶
func (q *Query) GetCategories(cat Category) (*DBResponse, error)
func (*Query) GetChannelPointsRedemption ¶
func (q *Query) GetChannelPointsRedemption(cpr ChannelPointsRedemption, sort string) (*DBResponse, error)
func (*Query) GetChannelPointsReward ¶
func (q *Query) GetChannelPointsReward(cpr ChannelPointsReward) (*DBResponse, error)
func (*Query) GetChannels ¶
func (q *Query) GetChannels(u User) (*DBResponse, error)
func (*Query) GetChatSettingsByBroadcaster ¶ added in v1.1.16
func (q *Query) GetChatSettingsByBroadcaster(broadcaster string) (*DBResponse, error)
func (*Query) GetDropsEntitlements ¶
func (q *Query) GetDropsEntitlements(de DropsEntitlement) (*DBResponse, error)
func (*Query) GetEditors ¶
func (q *Query) GetEditors(u User) (*DBResponse, error)
func (*Query) GetEventByID ¶
func (q *Query) GetEventByID(id string) (EventCacheResponse, error)
GetEventByID returns an event based on an ID provided for replay.
func (*Query) GetFollowedStreams ¶
func (q *Query) GetFollowedStreams(userID string) (*DBResponse, error)
func (*Query) GetFollows ¶
func (q *Query) GetFollows(p UserRequestParams, totalsFromUser bool) (*DBResponse, error)
"Total" returned depends on totalsFromUser bool. "true" will return the number of people the user from p.UserID currently follows. "false" will return the number of people the user from p.BroadcasterID currently follows.
func (*Query) GetModerationActionsByBroadcaster ¶
func (q *Query) GetModerationActionsByBroadcaster(broadcaster string) (*DBResponse, error)
func (*Query) GetModeratorEvents ¶
func (q *Query) GetModeratorEvents(p UserRequestParams) (*DBResponse, error)
func (*Query) GetModerators ¶
func (q *Query) GetModerators(p UserRequestParams) (*DBResponse, error)
func (*Query) GetModeratorsForBroadcaster ¶
func (q *Query) GetModeratorsForBroadcaster(broadcasterID string) (*DBResponse, error)
func (*Query) GetPredictions ¶
func (q *Query) GetPredictions(p Prediction) (*DBResponse, error)
func (*Query) GetSchedule ¶
func (q *Query) GetSchedule(p ScheduleSegment, startTime time.Time) (*DBResponse, error)
func (*Query) GetStreamMarkers ¶
func (q *Query) GetStreamMarkers(sm StreamMarker) (*DBResponse, error)
func (*Query) GetSubscriptions ¶
func (q *Query) GetSubscriptions(s Subscription) (*DBResponse, error)
func (*Query) GetTeamByBroadcaster ¶
func (q *Query) GetTeamByBroadcaster(broadcasterID string) (*DBResponse, error)
func (*Query) GetTopGames ¶
func (q *Query) GetTopGames() (*DBResponse, error)
func (*Query) GetVIPsByBroadcaster ¶ added in v1.1.16
func (q *Query) GetVIPsByBroadcaster(broadcaster string) (*DBResponse, error)
func (*Query) GetVacations ¶
func (q *Query) GetVacations(p ScheduleSegment) (ScheduleVacation, error)
func (*Query) InsertBan ¶
func (q *Query) InsertBan(p UserRequestParams) error
func (*Query) InsertChannelPointsRedemption ¶
func (q *Query) InsertChannelPointsRedemption(r ChannelPointsRedemption) error
func (*Query) InsertChannelPointsReward ¶
func (q *Query) InsertChannelPointsReward(r ChannelPointsReward) error
func (*Query) InsertChatSettings ¶ added in v1.1.16
func (q *Query) InsertChatSettings(s ChatSettings) error
func (*Query) InsertClip ¶
func (*Query) InsertDropsEntitlement ¶
func (q *Query) InsertDropsEntitlement(d DropsEntitlement) error
func (*Query) InsertIntoDB ¶
func (q *Query) InsertIntoDB(p EventCacheParameters) error
InsertIntoDB inserts an event into the database for replay functions later.
func (*Query) InsertMutedSegmentsForVideo ¶
func (q *Query) InsertMutedSegmentsForVideo(vms VideoMutedSegment) error
func (*Query) InsertOrUpdateAuthenticationClient ¶
func (q *Query) InsertOrUpdateAuthenticationClient(client AuthenticationClient, upsert bool) (AuthenticationClient, error)
func (*Query) InsertPoll ¶
func (*Query) InsertPrediction ¶
func (q *Query) InsertPrediction(p Prediction) error
func (*Query) InsertPredictionPrediction ¶
func (q *Query) InsertPredictionPrediction(p PredictionPrediction) error
func (*Query) InsertSchedule ¶
func (q *Query) InsertSchedule(p ScheduleSegment) error
func (*Query) InsertStreamMarker ¶
func (q *Query) InsertStreamMarker(sm StreamMarker) error
func (*Query) InsertSubscription ¶
func (q *Query) InsertSubscription(s SubscriptionInsert) error
func (*Query) InsertTeam ¶
func (*Query) InsertTeamMember ¶
func (q *Query) InsertTeamMember(tm TeamMember) error
func (*Query) InsertVideo ¶
func (*Query) RemoveModerator ¶
func (*Query) SearchCategories ¶
func (q *Query) SearchCategories(query string) (*DBResponse, error)
func (*Query) SearchChannels ¶
func (q *Query) SearchChannels(query string, live_only bool) (*DBResponse, error)
func (*Query) UpdateChannelPointsRedemption ¶
func (q *Query) UpdateChannelPointsRedemption(r ChannelPointsRedemption) error
func (*Query) UpdateChannelPointsReward ¶
func (q *Query) UpdateChannelPointsReward(r ChannelPointsReward) error
func (*Query) UpdateChatSettings ¶ added in v1.1.16
func (q *Query) UpdateChatSettings(s ChatSettings) error
func (*Query) UpdateDropsEntitlement ¶
func (q *Query) UpdateDropsEntitlement(d DropsEntitlement) error
func (*Query) UpdatePoll ¶
func (*Query) UpdatePollChoice ¶
func (q *Query) UpdatePollChoice(p PollsChoice) error
func (*Query) UpdatePrediction ¶
func (q *Query) UpdatePrediction(p Prediction) error
func (*Query) UpdateSegment ¶
func (q *Query) UpdateSegment(p ScheduleSegment) error
type Schedule ¶
type Schedule struct { Segments []ScheduleSegment `json:"segments"` UserID string `db:"broadcaster_id" json:"broadcaster_id"` UserLogin string `db:"broadcaster_login" json:"broadcaster_login" dbi:"false"` UserName string `db:"broadcaster_name" json:"broadcaster_name" dbi:"false"` Vacation *ScheduleVacation `json:"vacation"` }
type ScheduleSegment ¶
type ScheduleSegment struct { ID string `db:"id" json:"id" dbs:"s.id"` Title string `db:"title" json:"title"` StartTime string `db:"starttime" json:"start_time"` EndTime string `db:"endtime" json:"end_time"` IsRecurring bool `db:"is_recurring" json:"is_recurring"` IsVacation bool `db:"is_vacation" json:"-"` Category *SegmentCategory `json:"category"` UserID string `db:"broadcaster_id" json:"-"` CategoryID *string `db:"category_id" json:"-"` CategoryName *string `db:"category_name" dbi:"false" json:"-"` IsCanceled *bool `db:"is_canceled" json:"-"` CanceledUntil *string `json:"canceled_until"` }
type ScheduleVacation ¶
type SearchChannel ¶
type SearchChannel struct { ID string `db:"id" json:"id" dbs:"u1.id"` UserLogin string `db:"user_login" json:"broadcaster_login"` DisplayName string `db:"display_name" json:"display_name"` CategoryID *string `db:"category_id" json:"game_id" dbi:"false"` CategoryName *string `db:"category_name" json:"game_name" dbi:"false"` Title string `db:"title" json:"title"` Language string `db:"stream_language" json:"broadcaster_language"` TagIDs []string `json:"tag_ids" dbi:"false"` Tags []string `json:"tags" dbi:"false"` IsLive bool `json:"is_live" db:"is_live"` StartedAt *string `db:"started_at" json:"started_at"` // calculated fields ThumbNailURL string `json:"thumbnail_url"` }
type SegmentCategory ¶
type Stream ¶
type Stream struct { ID string `db:"id" json:"id" dbs:"s.id"` UserID string `db:"broadcaster_id" json:"user_id"` UserLogin string `db:"broadcaster_login" json:"user_login" dbi:"false"` UserName string `db:"broadcaster_name" json:"user_name" dbi:"false"` StreamType string `db:"stream_type" json:"type"` ViewerCount int `db:"viewer_count" json:"viewer_count"` StartedAt string `db:"started_at" json:"started_at"` IsMature bool `db:"is_mature" json:"is_mature"` TagIDs []string `json:"tag_ids" dbi:"false"` Tags []string `json:"tags" dbi:"false"` // stored in users, but pulled here for json parsing CategoryID sql.NullString `db:"category_id" json:"-" dbi:"false"` RealCategoryID string `json:"game_id"` CategoryName sql.NullString `db:"category_name" json:"-" dbi:"false"` RealCategoryName string `json:"game_name"` Title string `db:"title" json:"title" dbi:"false"` Language string `db:"stream_language" json:"language" dbi:"false"` // calculated fields ThumbnailURL string `json:"thumbnail_url"` }
type StreamMarker ¶
type StreamMarker struct { ID string `db:"id" dbs:"sm.id" json:"id"` CreatedAt string `db:"created_at" json:"created_at"` PositionSeconds int `db:"position_seconds" json:"position_seconds"` Description string `db:"description" json:"description"` BroadcasterID string `db:"broadcaster_id" json:"-"` VideoID string `db:"video_id" dbs:"v.id" json:"-"` URL string `json:"URL"` }
type StreamMarkerUser ¶
type StreamMarkerUser struct { BroadcasterID string `db:"broadcaster_id" json:"user_id"` BroadcasterLogin string `db:"broadcaster_login" json:"user_login" dbi:"false"` BroadcasterName string `db:"broadcaster_name" json:"user_name" dbi:"false"` Videos []StreamMarkerVideo `json:"videos"` }
type StreamMarkerVideo ¶
type StreamMarkerVideo struct { VideoID string `db:"video_id" dbs:"v.id" json:"video_id"` Markers []StreamMarker `json:"markers"` }
type Subscription ¶
type Subscription struct { BroadcasterID string `db:"broadcaster_id" json:"broadcaster_id"` BroadcasterLogin string `db:"broadcaster_login" json:"broadcaster_login"` BroadcasterName string `db:"broadcaster_name" json:"broadcaster_name"` UserID string `db:"user_id" json:"user_id"` UserLogin string `db:"user_login" json:"user_login"` UserName string `db:"user_name" json:"user_name"` IsGift bool `db:"is_gift" json:"is_gift"` GifterID *sql.NullString `db:"gifter_id" json:"gifter_id"` GifterName *sql.NullString `db:"gifter_name" json:"gifter_name"` GifterLogin *sql.NullString `db:"gifter_login" json:"gifter_login"` Tier string `db:"tier" json:"tier"` CreatedAt string `db:"created_at" json:"-"` // calculated fields PlanName string `json:"plan_name"` }
type SubscriptionInsert ¶
type SubscriptionInsert struct { BroadcasterID string `db:"broadcaster_id" json:"broadcaster_id"` UserID string `db:"user_id" json:"user_id"` IsGift bool `db:"is_gift" json:"is_gift"` GifterID *sql.NullString `db:"gifter_id" json:"gifter_id,omitempty"` Tier string `db:"tier" json:"tier"` CreatedAt string `db:"created_at" json:"-"` }
type Team ¶
type Team struct { ID string `db:"id" json:"id"` BackgroundImageUrl *string `db:"background_image_url" json:"background_image_url"` Banner *string `db:"banner" json:"banner"` CreatedAt string `db:"created_at" json:"created_at"` UpdatedAt string `db:"updated_at" json:"updated_at"` Info string `db:"info" json:"info"` ThumbnailURL string `db:"thumbnail_url" json:"thumbnail_url"` TeamName string `db:"team_name" json:"team_name"` TeamDisplayName string `db:"team_display_name" json:"team_display_name"` Users []TeamMember `json:"users"` }
type TeamMember ¶
type User ¶
type User struct { ID string `db:"id" json:"id" dbs:"u1.id"` UserLogin string `db:"user_login" json:"login"` DisplayName string `db:"display_name" json:"display_name"` Email string `db:"email" json:"email,omitempty"` UserType string `db:"user_type" json:"type"` BroadcasterType string `db:"broadcaster_type" json:"broadcaster_type"` UserDescription string `db:"user_description" json:"description"` CreatedAt string `db:"created_at" json:"created_at"` ModifiedAt string `db:"modified_at" json:"-"` ProfileImageURL string `dbi:"false" json:"profile_image_url" ` OfflineImageURL string `dbi:"false" json:"offline_image_url" ` ViewCount int `dbi:"false" json:"view_count"` CategoryID sql.NullString `db:"category_id" json:"game_id" dbi:"force"` CategoryName sql.NullString `db:"category_name" json:"game_name" dbi:"false"` Title string `db:"title" json:"title"` Language string `db:"stream_language" json:"stream_language"` Delay int `db:"delay" json:"delay" dbi:"force"` ChatColor string `db:"chat_color" json:"-"` IsBrandedContent bool `db:"branded_content" json:"is_branded_content"` // UnparsedCCLs is a comma seperated array (e.g. "Gambling,ViolentGraphic,ProfanityVulgarity") UnparsedCCLs string `db:"content_labels" json:"-"` }
type UserRequestParams ¶
type Video ¶
type Video struct { ID string `db:"id" json:"id" dbs:"v.id"` StreamID *string `db:"stream_id" json:"stream_id"` BroadcasterID string `db:"broadcaster_id" json:"user_id"` BroadcasterLogin string `db:"broadcaster_login" json:"user_login" dbi:"false"` BroadcasterName string `db:"broadcaster_name" json:"user_name" dbi:"false"` Title string `db:"title" json:"title"` VideoDescription string `db:"video_description" json:"description"` CreatedAt string `db:"created_at" json:"created_at"` PublishedAt string `db:"published_at" json:"published_at"` Viewable string `db:"viewable" json:"viewable"` ViewCount int `db:"view_count" json:"view_count"` Duration string `db:"duration" json:"duration"` VideoLanguage string `db:"video_language" json:"language"` MutedSegments []VideoMutedSegment `json:"muted_segments"` CategoryID *string `db:"category_id" dbs:"v.category_id" json:"-"` Type string `db:"type" json:"type"` // calculated fields URL string `json:"url"` ThumbnailURL string `json:"thumbnail_url"` PeriodDate string `db:"period_date" dbi:"false" json:"-"` }