-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.go
More file actions
51 lines (47 loc) · 1.95 KB
/
Copy pathmodels.go
File metadata and controls
51 lines (47 loc) · 1.95 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
package main
// MessageRequest represents a request to send a Pushover message.
type MessageRequest struct {
Message string `json:"message"`
Title string `json:"title,omitempty"`
Priority int `json:"priority,omitempty"`
Sound string `json:"sound,omitempty"`
Device string `json:"device,omitempty"`
URL string `json:"url,omitempty"`
URLTitle string `json:"url_title,omitempty"`
HTML int `json:"html,omitempty"`
Monospace int `json:"monospace,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
TTL int `json:"ttl,omitempty"`
Retry int `json:"retry,omitempty"`
Expire int `json:"expire,omitempty"`
Callback string `json:"callback,omitempty"`
Tags string `json:"tags,omitempty"`
}
// MessageResponse represents a response from the Pushover messages API.
type MessageResponse struct {
Status int `json:"status"`
Request string `json:"request"`
Receipt string `json:"receipt,omitempty"`
Errors []string `json:"errors,omitempty"`
}
// ReceiptResponse represents a response from the Pushover receipt polling API.
type ReceiptResponse struct {
Status int `json:"status"`
Request string `json:"request"`
Acknowledged int `json:"acknowledged"`
AcknowledgedAt int64 `json:"acknowledged_at"`
AcknowledgedBy string `json:"acknowledged_by"`
AcknowledgedByDevice string `json:"acknowledged_by_device"`
LastDeliveredAt int64 `json:"last_delivered_at"`
Expired int `json:"expired"`
ExpiresAt int64 `json:"expires_at"`
CalledBack int `json:"called_back"`
CalledBackAt int64 `json:"called_back_at"`
Errors []string `json:"errors,omitempty"`
}
// CancelResponse represents a response from the Pushover cancel API.
type CancelResponse struct {
Status int `json:"status"`
Request string `json:"request"`
Errors []string `json:"errors,omitempty"`
}