Documentation
¶
Index ¶
- func SendChatEvent(chatEvent *events.UserMessageEvent)
- func SendChatEventUserJoined(event events.UserJoinedEvent)
- func SendChatEventUsernameChanged(event events.NameChangeEvent)
- func SendEventToWebhooks(payload WebhookEvent)
- func SendStreamStatusEvent(eventType models.EventType)
- type WebhookChatMessage
- type WebhookEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendChatEvent ¶
func SendChatEvent(chatEvent *events.UserMessageEvent)
SendChatEvent will send a chat event to webhook destinations.
func SendChatEventUserJoined ¶
func SendChatEventUserJoined(event events.UserJoinedEvent)
SendChatEventUserJoined sends a webhook notifying that a user has joined.
func SendChatEventUsernameChanged ¶
func SendChatEventUsernameChanged(event events.NameChangeEvent)
SendChatEventUsernameChanged will send a username changed event to webhook destinations.
func SendEventToWebhooks ¶
func SendEventToWebhooks(payload WebhookEvent)
SendEventToWebhooks will send a single webhook event to all webhook destinations.
func SendStreamStatusEvent ¶
SendStreamStatusEvent will send all webhook destinations the current stream status.
Types ¶
type WebhookChatMessage ¶
type WebhookChatMessage struct {
User *user.User `json:"user,omitempty"`
ClientID uint `json:"clientId,omitempty"`
Body string `json:"body,omitempty"`
RawBody string `json:"rawBody,omitempty"`
ID string `json:"id,omitempty"`
Visible bool `json:"visible"`
Timestamp *time.Time `json:"timestamp,omitempty"`
}
WebhookChatMessage represents a single chat message sent as a webhook payload.
type WebhookEvent ¶
type WebhookEvent struct {
Type models.EventType `json:"type"` // messageSent | userJoined | userNameChange
EventData interface{} `json:"eventData,omitempty"`
}
WebhookEvent represents an event sent as a webhook.
Click to show internal directories.
Click to hide internal directories.