mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-11 23:47:32 +08:00
30 lines
592 B
Go
30 lines
592 B
Go
package body
|
|
|
|
type PushObj struct {
|
|
Platform any `json:"platform"`
|
|
Audience any `json:"audience"`
|
|
Notification any `json:"notification,omitempty"`
|
|
Message any `json:"message,omitempty"`
|
|
Options any `json:"options,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
|
|
}
|
|
|
|
func (p *PushObj) SetOptions(o *Options) {
|
|
p.Options = o
|
|
}
|