webhooklistener

package
v0.0.0-...-d3be85b Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenSecret

func GenSecret() (string, error)

Types

type ChannelBanHandler

type ChannelBanHandler func(*messages.Subscription, *messages.ChannelBanEvent)

ChannelBanHandler represents a handler for webhook messages of type ChannelBanEvent

func (ChannelBanHandler) Handle

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

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

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

Handle passes on a message to the handler function if it is of the correct type.

func (ChannelHypeTrainBeginHandler) Type

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

Handle passes on a message to the handler function if it is of the correct type.

func (ChannelHypeTrainEndHandler) Type

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

Handle passes on a message to the handler function if it is of the correct type.

func (ChannelHypeTrainProgressHandler) Type

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

Handle passes on a message to the handler function if it is of the correct type.

func (ChannelPointsCustomRewardAddHandler) Type

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

Handle passes on a message to the handler function if it is of the correct type.

func (ChannelPointsCustomRewardRedemptionAddHandler) Type

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

Handle passes on a message to the handler function if it is of the correct type.

func (ChannelPointsCustomRewardRedemptionUpdateHandler) Type

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

Handle passes on a message to the handler function if it is of the correct type.

func (ChannelPointsCustomRewardRemoveHandler) Type

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

Handle passes on a message to the handler function if it is of the correct type.

func (ChannelPointsCustomRewardUpdateHandler) Type

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

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

Handle passes on a message to the handler function if it is of the correct type.

func (ChannelSubscribeHandler) Type

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

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

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 NewListener(permissive bool) (*Listener, error)

func NewListenerWithSecret

func NewListenerWithSecret(secret string, permissive bool) (*Listener, error)

func (*Listener) Listen

func (l *Listener) Listen(webhookPath string, listenOn string) error

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.

func (*Listener) Secret

func (l *Listener) Secret() string

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

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

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

Handle passes on a message to the handler function if it is of the correct type.

func (UserAuthorizationRevokeHandler) Type

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

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)
}

Jump to

Keyboard shortcuts

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