notification.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package jpush
  2. // Notification .
  3. type Notification struct {
  4. Android *AndroidNotification `json:"android,omitempty"`
  5. IOS *IOSNotification `json:"ios,omitempty"`
  6. }
  7. // AndroidNotification .
  8. type AndroidNotification struct {
  9. Alert string `json:"alert"`
  10. Title string `json:"title,omitempty"`
  11. AlertType int `json:"alert_type,omitempty"`
  12. BuilderID int `json:"builder_id,omitempty"`
  13. Style int `json:"style,omitempty"`
  14. BigPicPath string `json:"big_pic_path,omitempty"`
  15. Extras interface{} `json:"extras,omitempty"`
  16. }
  17. // IOSAlert .
  18. type IOSAlert struct {
  19. Title string `json:"title"`
  20. Body string `json:"body"`
  21. }
  22. // IOSNotification .
  23. type IOSNotification struct {
  24. Alert interface{} `json:"alert"`
  25. Sound string `json:"sound,omitempty"`
  26. Badge int32 `json:"badge,omitempty"`
  27. ContentAvailable bool `json:"content-available,omitempty"`
  28. MutableContent bool `json:"mutable-content,omitempty"`
  29. Category string `json:"category,omitempty"`
  30. Extras interface{} `json:"extras,omitempty"`
  31. }