Documentation ¶
Overview ¶
*
- @Author: Resynz
- @Date: 2021/6/11 15:10
*
- @Author: Resynz
- @Date: 2021/6/11 14:55
*
- @Author: Resynz
- @Date: 2023/2/9 16:27
*
- @Author: Resynz
- @Date: 2021/6/11 14:56
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliMobilePusher ¶
type AliMobilePusher struct { Config *Config // contains filtered or unexported fields }
func NewAliMobilePusher ¶
func NewAliMobilePusher(conf *Config) (*AliMobilePusher, error)
func (*AliMobilePusher) Push ¶
func (s *AliMobilePusher) Push(param *PushParam) (*PushResponse, error)
推送
func (*AliMobilePusher) QueryPushStatByMsg ¶ added in v0.1.2
func (s *AliMobilePusher) QueryPushStatByMsg(appKey, msgId string) (*PushStat, error)
type PushParam ¶
type PushParam struct { Platform PushPlatform `json:"platform"` Type PushType `json:"type"` ApnsEnv ApnsEnv `json:"apns_env"` AppKey string `json:"app_key"` Title string `json:"title"` Body string `json:"body"` TargetType Target `json:"target_type"` TargetValue string `json:"target_value"` Ext string `json:"ext"` AndroidNotifyChannel string `json:"android_notify_channel"` AndroidNotificationXiaomiChannel string `json:"android_notification_xiaomi_channel"` AndroidNotificationVivoChannel string `json:"android_notification_vivo_channel"` AndroidNotificationHuaweiChannel string `json:"android_notification_huawei_channel"` AndroidPopupActivity string `json:"android_popup_activity"` }
推送参数
type PushPlatform ¶
type PushPlatform uint8
const ( PushPlatformIOS PushPlatform = iota PushPlatformAndroid )
type PushResponse ¶
type PushResponse struct { RequestId string `json:"request_id"` MessageId string `json:"message_id"` }
推送响应
type PushStat ¶ added in v0.1.2
type PushStat struct { AcceptCount int64 `json:"accept_count"` // 推送服务端接收到的推送数目 OpenedCount int64 `json:"opened_count"` // 通知在设备上被点击的数目 DeletedCount int64 `json:"deleted_count"` // 通知在设备上被清除的数目 SentCount int64 `json:"sent_count"` // 推送服务端实际发出的数目 ReceivedCount int64 `json:"received_count"` // 实际送达到设备的数目 }
Click to show internal directories.
Click to hide internal directories.