channelpoint

package
v0.0.0-...-55f2d51 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStoreRewardFromReward

func CreateStoreRewardFromReward(userID string, reward Reward) store.ChannelPointReward

func MarshallReward

func MarshallReward(reward Reward) string

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
}

Jump to

Keyboard shortcuts

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