Documentation ¶
Index ¶
- func CreateStoreRewardFromReward(userID string, reward Reward) store.ChannelPointReward
- func MarshallReward(reward Reward) string
- type BttvAdditionalOptions
- type ChannelPointManager
- type NominateAdditionalOptions
- type NominateReward
- type Reward
- type SevenTvAdditionalOptions
- type SevenTvReward
- type TwitchRewardConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateStoreRewardFromReward ¶
func CreateStoreRewardFromReward(userID string, reward Reward) store.ChannelPointReward
func MarshallReward ¶
Types ¶
type BttvAdditionalOptions ¶
type BttvAdditionalOptions struct {
Slots int
}
func UnmarshallBttvAdditionalOptions ¶
func UnmarshallBttvAdditionalOptions(jsonString string) BttvAdditionalOptions
type ChannelPointManager ¶
type ChannelPointManager struct {
// contains filtered or unexported fields
}
func NewChannelPointManager ¶
func NewChannelPointManager(cfg *config.Config, helixClient helixclient.Client, db *store.Database) *ChannelPointManager
func (*ChannelPointManager) CreateOrUpdateChannelPointReward ¶
func (cpm *ChannelPointManager) CreateOrUpdateChannelPointReward(userID string, request TwitchRewardConfig, rewardID string) (TwitchRewardConfig, error)
func (*ChannelPointManager) DeleteChannelPointReward ¶
func (cpm *ChannelPointManager) DeleteChannelPointReward(userID, rewardID string) error
type NominateAdditionalOptions ¶
type NominateAdditionalOptions struct { }
type NominateReward ¶
type NominateReward struct { TwitchRewardConfig NominateAdditionalOptions }
func (*NominateReward) GetAdditionalOptions ¶
func (r *NominateReward) GetAdditionalOptions() interface{}
func (*NominateReward) GetConfig ¶
func (r *NominateReward) GetConfig() TwitchRewardConfig
func (*NominateReward) GetType ¶
func (r *NominateReward) GetType() dto.RewardType
func (*NominateReward) SetConfig ¶
func (r *NominateReward) SetConfig(config TwitchRewardConfig)
type Reward ¶
type Reward interface { GetType() dto.RewardType GetConfig() TwitchRewardConfig SetConfig(config TwitchRewardConfig) GetAdditionalOptions() interface{} }
func CreateRewardFromBody ¶
func CreateRewardFromBody(body io.ReadCloser) (Reward, error)
type SevenTvAdditionalOptions ¶
type SevenTvAdditionalOptions struct {
Slots int
}
func UnmarshallSevenTvAdditionalOptions ¶
func UnmarshallSevenTvAdditionalOptions(jsonString string) SevenTvAdditionalOptions
type SevenTvReward ¶
type SevenTvReward struct { TwitchRewardConfig SevenTvAdditionalOptions }
func (*SevenTvReward) GetAdditionalOptions ¶
func (r *SevenTvReward) GetAdditionalOptions() interface{}
func (*SevenTvReward) GetConfig ¶
func (r *SevenTvReward) GetConfig() TwitchRewardConfig
func (*SevenTvReward) GetType ¶
func (r *SevenTvReward) GetType() dto.RewardType
func (*SevenTvReward) SetConfig ¶
func (r *SevenTvReward) SetConfig(config TwitchRewardConfig)
type TwitchRewardConfig ¶
type TwitchRewardConfig struct { Title string `json:"title"` Prompt string `json:"prompt"` Cost int `json:"cost"` BackgroundColor string `json:"backgroundColor"` IsMaxPerStreamEnabled bool `json:"isMaxPerStreamEnabled"` MaxPerStream int `json:"maxPerStream"` IsUserInputRequired bool `json:"isUserInputRequired"` IsMaxPerUserPerStreamEnabled bool `json:"isMaxPerUserPerStreamEnabled"` MaxPerUserPerStream int `json:"maxPerUserPerStream"` IsGlobalCooldownEnabled bool `json:"isGlobalCooldownEnabled"` GlobalCooldownSeconds int `json:"globalCooldownSeconds"` ShouldRedemptionsSkipRequestQueue bool `json:"shouldRedemptionsSkipRequestQueue"` ApproveOnly bool Enabled bool `json:"enabled"` ID string }
Click to show internal directories.
Click to hide internal directories.