Documentation ¶
Index ¶
Constants ¶
View Source
const ( ReceivedPayload EventType = 1 JobCompleted EventType = 2 Failure Status = 0 Success Status = 1 )
Constants defined for notification delivery.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶ added in v1.0.0
type Message struct { EventType EventType `json:"event_type"` Recorded time.Time `json:"recorded" swaggertype:"primitive,string"` DocumentType string `json:"document_type"` Status string `json:"status"` Message string `json:"message"` DocumentID string `json:"document_id"` AccountID string `json:"account_id"` // account_id is the account associated to webhook FromID string `json:"from_id"` // from_id if provided, original trigger of the event ToID string `json:"to_id"` // to_id if provided, final destination of the event }
Message is the payload used to send the notifications.
type Sender ¶
Sender defines methods that can handle a notification.
func NewWebhookSender ¶
func NewWebhookSender() Sender
NewWebhookSender returns an implementation of a Sender that sends notifications through webhooks.
Click to show internal directories.
Click to hide internal directories.