forked from mattermost/mattermost-plugin-mscalendar
/
notification.go
37 lines (28 loc) · 1.04 KB
/
notification.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2019-present Mattermost, Inc. All Rights Reserved.
// See License for license information.
package remote
type Notification struct {
Webhook interface{}
// Notification data
Subscription *Subscription
SubscriptionCreator *User
Event *Event
// ClientState from the webhook. The handler is to validate against its own
// persistent secret.
ClientState string
// Notification type
ChangeType string
// The (remote) subscription ID the notification is for
SubscriptionID string
// Remote-specific data: full raw JSON of the webhook, and the decoded
// backend-specific struct.
WebhookRawData []byte
// Set if subscription renewal is recommended. The date/time logic is
// internal to the remote implementation. The handler is to call
// RenewSubscription() as applicable, with the appropriate user credentials.
RecommendRenew bool
// Set if there is no data pre-filled from processing the webhook. The
// handler is to call GetNofiticationData(), with the appropriate user
// credentials.
IsBare bool
}