Documentation
¶
Index ¶
- func SendChatEvent(chatEvent *events.UserMessageEvent)
- func SendChatEventSetMessageVisibility(event events.SetMessageVisibilityEvent)
- func SendChatEventUserJoined(event events.UserJoinedEvent)
- func SendChatEventUserParted(event events.UserPartEvent)
- func SendChatEventUsernameChanged(event events.NameChangeEvent)
- func SendEventToWebhooks(payload WebhookEvent)
- func SendStreamStatusEvent(eventType models.EventType)
- func SetupWebhooks(getStatusFunc func() models.Status)
- type Job
- 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 SendChatEventSetMessageVisibility ¶ added in v0.1.0
func SendChatEventSetMessageVisibility(event events.SetMessageVisibilityEvent)
SendChatEventSetMessageVisibility sends a webhook notifying that the visibility of one or more messages has changed.
func SendChatEventUserJoined ¶
func SendChatEventUserJoined(event events.UserJoinedEvent)
SendChatEventUserJoined sends a webhook notifying that a user has joined.
func SendChatEventUserParted ¶ added in v0.1.2
func SendChatEventUserParted(event events.UserPartEvent)
SendChatEventUserParted sends a webhook notifying that a user has parted.
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.
func SetupWebhooks ¶ added in v0.1.1
SetupWebhooks initializes the webhook worker pool and sets the function to get the current status.
Types ¶
type Job ¶ added in v0.0.11
type Job struct {
// contains filtered or unexported fields
}
Job struct bundling the webhook and the payload in one struct.
type WebhookChatMessage ¶
type WebhookChatMessage struct { User *models.User `json:"user,omitempty"` Timestamp *time.Time `json:"timestamp,omitempty"` Body string `json:"body,omitempty"` RawBody string `json:"rawBody,omitempty"` ID string `json:"id,omitempty"` ClientID uint `json:"clientId,omitempty"` Visible bool `json:"visible"` }
WebhookChatMessage represents a single chat message sent as a webhook payload.
type WebhookEvent ¶
type WebhookEvent struct { EventData interface{} `json:"eventData,omitempty"` Type models.EventType `json:"type"` // messageSent | userJoined | userNameChange }
WebhookEvent represents an event sent as a webhook.