61 lines
2.3 KiB
Go
61 lines
2.3 KiB
Go
package conduit
|
|
|
|
import "go.fifitido.net/twitch/api/eventsub"
|
|
|
|
type ConduitData struct {
|
|
// Conduit ID.
|
|
ID string `json:"id"`
|
|
|
|
// Number of shards associated with this conduit.
|
|
ShardCount int `json:"shard_count"`
|
|
}
|
|
|
|
type Shard struct {
|
|
// Shard ID.
|
|
ID string `json:"id"`
|
|
|
|
// The shard status. The subscriber receives events only for enabled shards
|
|
Status Status `json:"status"`
|
|
|
|
// The transport details used to send the notifications.
|
|
Transport *eventsub.Transport `json:"transport"`
|
|
}
|
|
|
|
type Status string
|
|
|
|
const (
|
|
// enabled — The shard is enabled.
|
|
StatusEnabled Status = "enabled"
|
|
|
|
// webhook_callback_verification_pending — The shard is pending verification of the specified callback URL.
|
|
StatusWebhookCallbackVerificationPending Status = "webhook_callback_verification_pending"
|
|
|
|
// webhook_callback_verification_failed — The specified callback URL failed verification.
|
|
StatusWebhookCallbackVerificationFailed Status = "webhook_callback_verification_failed"
|
|
|
|
// notification_failures_exceeded — The notification delivery failure rate was too high.
|
|
NotificationFailuresExceeded Status = "notification_failures_exceeded"
|
|
|
|
// websocket_disconnected — The client closed the connection.
|
|
WebsocketDisconnected Status = "websocket_disconnected"
|
|
|
|
// websocket_failed_ping_pong — The client failed to respond to a ping message.
|
|
WebsocketFailedPingPong Status = "websocket_failed_ping_pong"
|
|
|
|
// websocket_received_inbound_traffic — The client sent a non-pong message.
|
|
// Clients may only send pong messages (and only in response to a ping message).
|
|
WebsocketReceivedInboundTraffic Status = "websocket_received_inbound_traffic"
|
|
|
|
// websocket_connection_unused — The client failed to subscribe to events within the required time.
|
|
WebsocketConnectionUnused Status = "websocket_connection_unused"
|
|
|
|
// websocket_internal_error — The Twitch WebSocket server experienced an unexpected error.
|
|
WebsocketInternalError Status = "websocket_internal_error"
|
|
|
|
// websocket_network_timeout — The Twitch WebSocket server timed out writing the message to the client.
|
|
WebsocketNetworkTimeout Status = "websocket_network_timeout"
|
|
|
|
// websocket_network_error — The Twitch WebSocket server experienced a network error writing the message to the client.
|
|
WebsocketnetworkError Status = "websocket_network_error"
|
|
)
|