add jpush offline notification

This commit is contained in:
Gordon
2021-10-28 09:51:36 +08:00
parent 97fa1146b2
commit 30be5c2c48
13 changed files with 287 additions and 90 deletions

View File

@@ -0,0 +1,24 @@
package requestBody
type PushObj struct {
Platform interface{} `json:"platform"`
Audience interface{} `json:"audience"`
Notification interface{} `json:"notification,omitempty"`
Message interface{} `json:"message,omitempty"`
}
func (p *PushObj) SetPlatform(pf *Platform) {
p.Platform = pf.Os
}
func (p *PushObj) SetAudience(ad *Audience) {
p.Audience = ad.Object
}
func (p *PushObj) SetNotification(no *Notification) {
p.Notification = no
}
func (p *PushObj) SetMessage(m *Message) {
p.Message = m
}