Documentation ¶
Index ¶
- func GenSecret() (string, error)
- type ChannelBanHandler
- type ChannelCheerHandler
- type ChannelFollowHandler
- type ChannelHypeTrainBeginHandler
- type ChannelHypeTrainEndHandler
- type ChannelHypeTrainProgressHandler
- type ChannelPointsCustomRewardAddHandler
- type ChannelPointsCustomRewardRedemptionAddHandler
- type ChannelPointsCustomRewardRedemptionUpdateHandler
- type ChannelPointsCustomRewardRemoveHandler
- type ChannelPointsCustomRewardUpdateHandler
- type ChannelRaidHandler
- type ChannelSubscribeHandler
- type ChannelUnbanHandler
- type ChannelUpdateHandler
- type Listener
- type StreamOfflineHandler
- type StreamOnlineHandler
- type UserAuthorizationRevokeHandler
- type UserUpdateHandler
- type WebhookHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChannelBanHandler ¶
type ChannelBanHandler func(*messages.Subscription, *messages.ChannelBanEvent)
ChannelBanHandler represents a handler for webhook messages of type ChannelBanEvent
func (ChannelBanHandler) Handle ¶
func (h ChannelBanHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelBanHandler) Type ¶
func (h ChannelBanHandler) Type() string
Type returns the string representing ChannelBan's event name on the Twitch API
type ChannelCheerHandler ¶
type ChannelCheerHandler func(*messages.Subscription, *messages.ChannelCheerEvent)
ChannelCheerHandler represents a handler for webhook messages of type ChannelCheerEvent
func (ChannelCheerHandler) Handle ¶
func (h ChannelCheerHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelCheerHandler) Type ¶
func (h ChannelCheerHandler) Type() string
Type returns the string representing ChannelCheer's event name on the Twitch API
type ChannelFollowHandler ¶
type ChannelFollowHandler func(*messages.Subscription, *messages.ChannelFollowEvent)
ChannelFollowHandler represents a handler for webhook messages of type ChannelFollowEvent
func (ChannelFollowHandler) Handle ¶
func (h ChannelFollowHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelFollowHandler) Type ¶
func (h ChannelFollowHandler) Type() string
Type returns the string representing ChannelFollow's event name on the Twitch API
type ChannelHypeTrainBeginHandler ¶
type ChannelHypeTrainBeginHandler func(*messages.Subscription, *messages.ChannelHypeTrainBeginEvent)
ChannelHypeTrainBeginHandler represents a handler for webhook messages of type ChannelHypeTrainBeginEvent
func (ChannelHypeTrainBeginHandler) Handle ¶
func (h ChannelHypeTrainBeginHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelHypeTrainBeginHandler) Type ¶
func (h ChannelHypeTrainBeginHandler) Type() string
Type returns the string representing ChannelHypeTrainBegin's event name on the Twitch API
type ChannelHypeTrainEndHandler ¶
type ChannelHypeTrainEndHandler func(*messages.Subscription, *messages.ChannelHypeTrainEndEvent)
ChannelHypeTrainEndHandler represents a handler for webhook messages of type ChannelHypeTrainEndEvent
func (ChannelHypeTrainEndHandler) Handle ¶
func (h ChannelHypeTrainEndHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelHypeTrainEndHandler) Type ¶
func (h ChannelHypeTrainEndHandler) Type() string
Type returns the string representing ChannelHypeTrainEnd's event name on the Twitch API
type ChannelHypeTrainProgressHandler ¶
type ChannelHypeTrainProgressHandler func(*messages.Subscription, *messages.ChannelHypeTrainProgressEvent)
ChannelHypeTrainProgressHandler represents a handler for webhook messages of type ChannelHypeTrainProgressEvent
func (ChannelHypeTrainProgressHandler) Handle ¶
func (h ChannelHypeTrainProgressHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelHypeTrainProgressHandler) Type ¶
func (h ChannelHypeTrainProgressHandler) Type() string
Type returns the string representing ChannelHypeTrainProgress's event name on the Twitch API
type ChannelPointsCustomRewardAddHandler ¶
type ChannelPointsCustomRewardAddHandler func(*messages.Subscription, *messages.ChannelPointsCustomRewardAddEvent)
ChannelPointsCustomRewardAddHandler represents a handler for webhook messages of type ChannelPointsCustomRewardAddEvent
func (ChannelPointsCustomRewardAddHandler) Handle ¶
func (h ChannelPointsCustomRewardAddHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelPointsCustomRewardAddHandler) Type ¶
func (h ChannelPointsCustomRewardAddHandler) Type() string
Type returns the string representing ChannelPointsCustomRewardAdd's event name on the Twitch API
type ChannelPointsCustomRewardRedemptionAddHandler ¶
type ChannelPointsCustomRewardRedemptionAddHandler func(*messages.Subscription, *messages.ChannelPointsCustomRewardRedemptionAddEvent)
ChannelPointsCustomRewardRedemptionAddHandler represents a handler for webhook messages of type ChannelPointsCustomRewardRedemptionAddEvent
func (ChannelPointsCustomRewardRedemptionAddHandler) Handle ¶
func (h ChannelPointsCustomRewardRedemptionAddHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelPointsCustomRewardRedemptionAddHandler) Type ¶
func (h ChannelPointsCustomRewardRedemptionAddHandler) Type() string
Type returns the string representing ChannelPointsCustomRewardRedemptionAdd's event name on the Twitch API
type ChannelPointsCustomRewardRedemptionUpdateHandler ¶
type ChannelPointsCustomRewardRedemptionUpdateHandler func(*messages.Subscription, *messages.ChannelPointsCustomRewardRedemptionUpdateEvent)
ChannelPointsCustomRewardRedemptionUpdateHandler represents a handler for webhook messages of type ChannelPointsCustomRewardRedemptionUpdateEvent
func (ChannelPointsCustomRewardRedemptionUpdateHandler) Handle ¶
func (h ChannelPointsCustomRewardRedemptionUpdateHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelPointsCustomRewardRedemptionUpdateHandler) Type ¶
func (h ChannelPointsCustomRewardRedemptionUpdateHandler) Type() string
Type returns the string representing ChannelPointsCustomRewardRedemptionUpdate's event name on the Twitch API
type ChannelPointsCustomRewardRemoveHandler ¶
type ChannelPointsCustomRewardRemoveHandler func(*messages.Subscription, *messages.ChannelPointsCustomRewardRemoveEvent)
ChannelPointsCustomRewardRemoveHandler represents a handler for webhook messages of type ChannelPointsCustomRewardRemoveEvent
func (ChannelPointsCustomRewardRemoveHandler) Handle ¶
func (h ChannelPointsCustomRewardRemoveHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelPointsCustomRewardRemoveHandler) Type ¶
func (h ChannelPointsCustomRewardRemoveHandler) Type() string
Type returns the string representing ChannelPointsCustomRewardRemove's event name on the Twitch API
type ChannelPointsCustomRewardUpdateHandler ¶
type ChannelPointsCustomRewardUpdateHandler func(*messages.Subscription, *messages.ChannelPointsCustomRewardUpdateEvent)
ChannelPointsCustomRewardUpdateHandler represents a handler for webhook messages of type ChannelPointsCustomRewardUpdateEvent
func (ChannelPointsCustomRewardUpdateHandler) Handle ¶
func (h ChannelPointsCustomRewardUpdateHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelPointsCustomRewardUpdateHandler) Type ¶
func (h ChannelPointsCustomRewardUpdateHandler) Type() string
Type returns the string representing ChannelPointsCustomRewardUpdate's event name on the Twitch API
type ChannelRaidHandler ¶
type ChannelRaidHandler func(*messages.Subscription, *messages.ChannelRaidEvent)
ChannelRaidHandler represents a handler for webhook messages of type ChannelRaidEvent
func (ChannelRaidHandler) Handle ¶
func (h ChannelRaidHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelRaidHandler) Type ¶
func (h ChannelRaidHandler) Type() string
Type returns the string representing ChannelRaid's event name on the Twitch API
type ChannelSubscribeHandler ¶
type ChannelSubscribeHandler func(*messages.Subscription, *messages.ChannelSubscribeEvent)
ChannelSubscribeHandler represents a handler for webhook messages of type ChannelSubscribeEvent
func (ChannelSubscribeHandler) Handle ¶
func (h ChannelSubscribeHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelSubscribeHandler) Type ¶
func (h ChannelSubscribeHandler) Type() string
Type returns the string representing ChannelSubscribe's event name on the Twitch API
type ChannelUnbanHandler ¶
type ChannelUnbanHandler func(*messages.Subscription, *messages.ChannelUnbanEvent)
ChannelUnbanHandler represents a handler for webhook messages of type ChannelUnbanEvent
func (ChannelUnbanHandler) Handle ¶
func (h ChannelUnbanHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelUnbanHandler) Type ¶
func (h ChannelUnbanHandler) Type() string
Type returns the string representing ChannelUnban's event name on the Twitch API
type ChannelUpdateHandler ¶
type ChannelUpdateHandler func(*messages.Subscription, *messages.ChannelUpdateEvent)
ChannelUpdateHandler represents a handler for webhook messages of type ChannelUpdateEvent
func (ChannelUpdateHandler) Handle ¶
func (h ChannelUpdateHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (ChannelUpdateHandler) Type ¶
func (h ChannelUpdateHandler) Type() string
Type returns the string representing ChannelUpdate's event name on the Twitch API
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
func NewListenerWithSecret ¶
func (*Listener) Listen ¶
Listen starts listening for incoming webhook calls at the pattern `webhookPath` on interface and port `listenOk`
func (*Listener) NotificationsChannel ¶
func (l *Listener) NotificationsChannel() chan messages.EventNotificationMessage
NotificationsChannel returns the channel upon which messages are returned.
type StreamOfflineHandler ¶
type StreamOfflineHandler func(*messages.Subscription, *messages.StreamOfflineEvent)
StreamOfflineHandler represents a handler for webhook messages of type StreamOfflineEvent
func (StreamOfflineHandler) Handle ¶
func (h StreamOfflineHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (StreamOfflineHandler) Type ¶
func (h StreamOfflineHandler) Type() string
Type returns the string representing StreamOffline's event name on the Twitch API
type StreamOnlineHandler ¶
type StreamOnlineHandler func(*messages.Subscription, *messages.StreamOnlineEvent)
StreamOnlineHandler represents a handler for webhook messages of type StreamOnlineEvent
func (StreamOnlineHandler) Handle ¶
func (h StreamOnlineHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (StreamOnlineHandler) Type ¶
func (h StreamOnlineHandler) Type() string
Type returns the string representing StreamOnline's event name on the Twitch API
type UserAuthorizationRevokeHandler ¶
type UserAuthorizationRevokeHandler func(*messages.Subscription, *messages.UserAuthorizationRevokeEvent)
UserAuthorizationRevokeHandler represents a handler for webhook messages of type UserAuthorizationRevokeEvent
func (UserAuthorizationRevokeHandler) Handle ¶
func (h UserAuthorizationRevokeHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (UserAuthorizationRevokeHandler) Type ¶
func (h UserAuthorizationRevokeHandler) Type() string
Type returns the string representing UserAuthorizationRevoke's event name on the Twitch API
type UserUpdateHandler ¶
type UserUpdateHandler func(*messages.Subscription, *messages.UserUpdateEvent)
UserUpdateHandler represents a handler for webhook messages of type UserUpdateEvent
func (UserUpdateHandler) Handle ¶
func (h UserUpdateHandler) Handle(msg messages.EventNotificationMessage)
Handle passes on a message to the handler function if it is of the correct type.
func (UserUpdateHandler) Type ¶
func (h UserUpdateHandler) Type() string
Type returns the string representing UserUpdate's event name on the Twitch API
type WebhookHandler ¶
type WebhookHandler interface { Type() string Handle(msg messages.EventNotificationMessage) }