Adding upstream version 0.8.9.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
3b2c48b5e4
commit
c0c4addb85
285 changed files with 25880 additions and 0 deletions
29
pkg/services/bark/bark_json.go
Normal file
29
pkg/services/bark/bark_json.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package bark
|
||||
|
||||
// PushPayload represents the notification payload for the Bark notification service.
|
||||
type PushPayload struct {
|
||||
Body string `json:"body"`
|
||||
DeviceKey string `json:"device_key"`
|
||||
Title string `json:"title"`
|
||||
Sound string `json:"sound,omitempty"`
|
||||
Badge *int64 `json:"badge,omitempty"`
|
||||
Icon string `json:"icon,omitempty"`
|
||||
Group string `json:"group,omitempty"`
|
||||
URL string `json:"url,omitempty"`
|
||||
Category string `json:"category,omitempty"`
|
||||
Copy string `json:"copy,omitempty"`
|
||||
}
|
||||
|
||||
// APIResponse represents a response from the Bark API.
|
||||
//
|
||||
//nolint:errname
|
||||
type APIResponse struct {
|
||||
Code int64 `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
}
|
||||
|
||||
// Error returns the error message from the API response when applicable.
|
||||
func (e *APIResponse) Error() string {
|
||||
return "server response: " + e.Message
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue