-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
35 lines (29 loc) · 1.13 KB
/
types.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
package jpush
import "encoding/json"
type Platform string
const (
Android Platform = "android"
IOS Platform = "ios"
)
type Request struct {
// Required.
Platform Platform `json:"platform"` // Settings of push platform.
Audience Audience `json:"audience"` // Designation of push device.
Message *Message `json:"message,omitempty"` // Message content body.
Notification interface{} `json:"notification,omitempty"` // Notification content body.
}
type Audience struct {
Tag []string `json:"tag,omitempty"`
TagAnd []string `json:"tag_and,omitempty"`
TagNot []string `json:"tag_not,omitempty"`
Alias []string `json:"alias,omitempty"`
Segment []string `json:"segment,omitempty"`
Abtest []string `json:"abtest,omitempty"`
RegistrationId []string `json:"registration_id,omitempty"`
}
type Message struct {
MsgContent string `json:"msg_content,omitempty"`
Title string `json:"title,omitempty"`
ContentType string `json:"content_type,omitempty"`
Extras json.RawMessage `json:"extras,omitempty"`
}