forked from zwczou/jpush
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notification.go
39 lines (35 loc) · 1.72 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
38
39
package jpush
type Notification struct {
Alert string `json:"alert,omitempty"`
Android *AndroidNotification `json:"android,omitempty"`
Ios *IosNotification `json:"ios,omitempty"`
WinPhone *WinPhoneNotification `json:"winphone,omitempty"`
}
type AndroidNotification struct {
Alert string `json:"alert"`
Title string `json:"title,omitempty"`
BuilderId int `json:"builder_id,omitempty"`
Priority int `json:"priority,omitempty"`
Category string `json:"category,omitempty"`
Style int `json:"style,omitempty"`
AlertType int `json:"alert_type,omitempty"`
BigText string `json:"big_text,omitempty"`
Inbox map[string]interface{} `json:"inbox,omitempty"`
BigPicPath string `json:"big_pic_path,omitempty"`
Extras map[string]interface{} `json:"extras,omitempty"`
}
type IosNotification struct {
Alert interface{} `json:"alert"`
Sound string `json:"sound,omitempty"`
Badge interface{} `json:"badge,omitempty"`
ContentAvailable bool `json:"content-available,omitempty"`
MutableContent bool `json:"mutable-content,omitempty"`
Category string `json:"category,omitempty"`
Extras map[string]interface{} `json:"extras,omitempty"`
}
type WinPhoneNotification struct {
Alert string `json:"alert"`
Title string `json:"title,omitempty"`
OpenPage string `json:"_open_page,omitempty"`
Extras map[string]interface{} `json:"extras,omitempty"`
}