-
Notifications
You must be signed in to change notification settings - Fork 2
/
result.go
24 lines (22 loc) · 1.01 KB
/
result.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
package gcm
// Result represents the status of a processed message.
//
// Some fields are specific to device group messages: Success, Failure, FailedRegistrationIDs.
type Result struct {
MessageID string `json:"message_id,omitempty"`
CanonicalRegistrationID string `json:"canonical_registration_id,omitempty"`
Error string `json:"error,omitempty"`
// device group message only
Success int `json:"success,omitempty"`
Failure int `json:"failure,omitempty"`
FailedRegistrationIDs []string `json:"failed_registration_ids,omitempty"`
}
// MulticastResult represents the response of a processed multicast message.
type MulticastResult struct {
Success int `json:"success"`
Failure int `json:"failure"`
CanonicalIds int `json:"canonical_ids"`
MulticastID int64 `json:"multicast_id"`
Results []Result `json:"results,omitempty"`
RetryMulticastIDs []int64 `json:"retry_multicast_ids,omitempty"`
}