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
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidTransports ¶
func ValidTransports() []string
Types ¶
type MockEvent ¶ added in v0.3.2
type MockEvent interface {
// Returns the Mock Response for the given transport
GenerateEvent(p MockEventParameters) (MockEventResponse, error)
// Returns the trigger for the event (e.g. cheer for cheer events, or add-reward for channel points add rewards)
ValidTrigger(trigger string) bool
// Returns whether a given event supports a supplied transport
ValidTransport(transport string) bool
// Returns
GetAllTopicsByTransport(transport string) []string
// Returns the string of the topic
GetTopic(transport string, trigger string) string
// Returns back the correct "trigger" if using the eventsub topic
GetEventSubAlias(trigger string) string
// Returns the subscription version for this event
SubscriptionVersion() string
}
MockEvent represents an event to be triggered using the `twitch event trigger <event>` command.
type MockEventParameters ¶ added in v0.3.2
type MockEventParameters struct {
EventMessageID string
SubscriptionID string
Transport string
Trigger string
FromUserID string
FromUserName string
ToUserID string
ToUserName string
IsAnonymous bool
IsGift bool
GiftUser string
EventStatus string
SubscriptionStatus string
ItemID string
ItemName string
Cost int64
Description string
GameID string
Tier string
Timestamp string
CharityCurrentValue int
CharityTargetValue int
ClientID string
BanStartTimestamp string
BanEndTimestamp string
}
MockEventParameters are used to craft the event; most of this data is prepopulated by lower services, such as the from/to users to avoid replicating logic across files
Click to show internal directories.
Click to hide internal directories.