Documentation
¶
Overview ¶
api document http://open-wiki.flyme.cn/doc-wiki/index
Index ¶
- Constants
- Variables
- type AccessToken
- type AndroidExtra
- type AppPush
- type BroadCastPayload
- type DeviceType
- type HWBroadCastPayload
- type HWPayload
- type HWPushResponse
- type HWTokenResponse
- type HuaWeiMsgActionType
- type HuaWeiMsgType
- type HuaWeiPush
- type IOSExtra
- type MeiZuMsgNotification
- type MeiZuMsgTransparent
- type MeiZuNotify
- type MeiZuPush
- type MeiZuResponse
- type OPPOBroadCastResponse
- type OPPOClickType
- type OPPOCommonResponse
- type OPPONotifyPayload
- type OPPOPush
- type OPPOPushType
- type PlatformType
- type PushInterface
- type PushReq
- type PushTimeInfo
- type UniBatchCastPayload
- type UniCastPayload
- type UniCastPayloadBody
- type VIVOCommonResponse
- type VIVONotifyOpenType
- type VIVONotifyPayload
- type VIVONotifyType
- type VIVOPush
- type VIVOPushType
- type XMCommonResp
- type XMMsgType
- type XMNotifyEffectType
- type XMNotifyType
- type XMPayload
- type XMResp
- type XiaoMiPush
Constants ¶
View Source
const ( PRO_API_HW_TOKEN string = "https://login.cloud.huawei.com/oauth2/v2/token" PRO_API_HW_SEND string = "https://api.push.hicloud.com/pushsend.do" )
View Source
const ( PRO_API_MZ_PREFIX string = "http://server-api-mzups.meizu.com" PRO_API_MZ_MSG_TRANSPARENT string = "/ups/api/server/push/unvarnished/pushByPushId" PRO_API_MZ_MSG_NOTIFY string = "/ups/api/server/push/varnished/pushByPushId" PRO_API_MZ_MSG_TRANSPARENT_ALIAS string = "/ups/api/server/push/unvarnished/pushByAlias" PRO_API_MZ_MSG_NOTIFY_ALIAS string = "/ups/api/server/push/varnished/pushByAlias" PRO_API_MZ_MSG_NOTIFY_ALL string = "/ups/api/server/push/pushTask/pushToApp" PRO_API_MZ_MSG_CANCEL string = "/ups/api/server/push/pushTask/cancel" PRO_API_MZ_MSG_STATICS string = "/ups/api/server/push/statistics/dailyPushStatics" )
View Source
const ( PRO_API_OPPO_PREFIX string = "https://api.push.oppomobile.com/server/v1" PRO_API_OPPO_SUBFIX_TOKEN string = "/auth" PRO_API_OPPO_SUBFIX_SAVE string = "/message/notification/save_message_content" PRO_API_OPPO_SUBFIX_BROADCAST string = "/message/notification/broadcast" PRO_API_OPPO_SUBFIX_UNICAST string = "/message/notification/unicast" PRO_API_OPPO_SUBFIX_UNICASTBATCH string = "/message/notification/unicast_batch" )
View Source
const ( PRO_API_VIVO_PREFIX string = "https://api-push.vivo.com.cn" PRO_API_VIVO_SUBFIX_TOKEN string = "/message/auth" PRO_API_VIVO_SUBFIX_SAVE string = "/message/saveListPayload" PRO_API_VIVO_SUBFIX_BROADCAST string = "/message/all" PRO_API_VIVO_SUBFIX_UNICAST string = "/message/send" PRO_API_VIVO_SUBFIX_UNICASTBATCH string = "/message/pushToList" )
View Source
const ( APILevel int = 3 XMExtraPrefix string = "extra." )
View Source
const ( PRO_API_XM_ACCOUNT string = "https://api.xmpush.xiaomi.com/v2/message/user_account" PRO_API_XM_ALIAS string = "https://api.xmpush.xiaomi.com/v3/message/alias" PRO_API_XM_TOPIC string = "https://api.xmpush.xiaomi.com/v3/message/topic" PRO_API_XM_MTOPIC string = "https://api.xmpush.xiaomi.com/v3/message/multi_topic" PRO_API_XM_ALL string = "https://api.xmpush.xiaomi.com/v3/message/all" )
View Source
const ( TEST_IOS_XM_REGID string = "https://sandbox.xmpush.xiaomi.com/v2/message/regid" TEST_IOS_XM_ALIAS string = "https://sandbox.xmpush.xiaomi.com/v2/message/alias" TEST_IOS_XM_ACCOUNT string = "https://sandbox.xmpush.xiaomi.com/v2/message/user_account" TEST_IOS_XM_TOPIC string = "https://sandbox.xmpush.xiaomi.com/v2/message/topic" TEST_IOS_XM_MTOPIC string = "https://sandbox.xmpush.xiaomi.com/v2/message/multi_topic" TEST_IOS_XM_ALL string = "https://sandbox.xmpush.xiaomi.com/v2/message/all" )
Variables ¶
View Source
var ( OPPOMissingDeviceErr = errors.New("missing device err") OPPOMissingMasterKeyErr = errors.New("missing oppo masterKey err") OPPOMissingPushTypeErr = errors.New("missing oppo push type err") VIVOMissingAppSecretKeyErr = errors.New("missing vivo appSecretKey err") VIVOMissingAppKeyErr = errors.New("missing vivo appKey err") VIVOMissingAppIdErr = errors.New("missing vivo appId err") VIVOMissingTargetErr = errors.New("missing vivo alias or regid err") VIVOMissingBatchTargetErr = errors.New("missing vivo aliases or regids err") HWMissingClientIdErr = errors.New("missing clientId err") HWMissingClientSecretErr = errors.New("missing clientSecret err") MissingMeiZuAppKeyErr = errors.New("missing meizu appid err") MissingAppKeyErr = errors.New("missing appkey err") MissingAppPkgNameErr = errors.New("missing appPkgName err") )
View Source
var ( Device DeviceType AppPkgName string )
View Source
var ( HWClientId string HWClientSecret string )
View Source
var ( OPPOMasterKey string OPPOAppKey string )
View Source
var ( MZAppId int MZAppKey string )
View Source
var ( VIVOAppId int VIVOAppKey string VIVOAppSecret string )
View Source
var HttpServerErr = errors.New("http server err")
View Source
var MissingUrlErr = errors.New("missing url")
View Source
var (
XMAppSecret string
)
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AndroidExtra ¶
type AndroidExtra struct {
SoundUri string `url:"extra.sound_uri,omitempty" json:"sound_uri,omitempty"`
Ticker string `url:"extra.ticker,omitempty" json:"ticker,omitempty"`
NotifyForeground string `url:"extra.notify_foreground,omitempty" json:"notify_foreground,omitempty"` //1开启前台,0关闭
NotifyEffect XMNotifyEffectType `url:"extra.notify_effect,omitempty" json:"notify_effect,omitempty"` //设置该值在MIUI7上有问题
IntentUri string `url:"extra.intent_uri,omitempty" json:"intent_uri,omitempty"`
WebUri string `url:"extra.web_uri,omitempty" json:"web_uri,omitempty"`
FlowControl int `url:"extra.flow_control,omitempty" json:"flow_control,omitempty"`
LayoutName int `url:"extra.layout_name,omitempty" json:"layout_name,omitempty"`
LayoutValue int `url:"extra.layout_value,omitempty" json:"layout_value,omitempty"`
JobKey string `url:"extra.jobkey,omitempty" json:"jobkey,omitempty"`
Callback string `url:"extra.callback,omitempty" json:"callback,omitempty"`
Locale string `url:"extra.locale,omitempty" json:"locale,omitempty"`
LocaleNotIn string `url:"extra.locale_not_in,omitempty" json:"locale_not_in,omitempty"`
Model string `url:"extra.model,omitempty" json:"model,omitempty"`
ModelNotIn string `url:"extra.model_not_in,omitempty" json:"model_not_in,omitempty"`
AppVersion string `url:"extra.app_version,omitempty" json:"app_version,omitempty"`
AppVersionNotIn string `url:"extra.app_version_not_in,omitempty" json:"app_version_not_in,omitempty"`
Connpt string `url:"extra.connpt,omitempty" json:"connpt,omitempty"`
}
type AppPush ¶
type AppPush struct {
Provider PlatformType
Device DeviceType
HWPush *HuaWeiPush
XMPush *XiaoMiPush
OPPush *OPPOPush
VOPush *VIVOPush
MZPush *MeiZuPush
}
func NewAppPush ¶
func NewAppPush(c PlatformType) *AppPush
type BroadCastPayload ¶
type BroadCastPayload struct {
MessageId string `url:"message_id,omitempty" json:"message_id,omitempty"`
TargetType OPPOPushType `url:"target_type,omitempty" json:"target_type,omitempty"`
TargetValue string `url:"target_value,omitempty" json:"target_value,omitempty"`
}
type DeviceType ¶
type DeviceType uint32
const ( DeviceNil DeviceType = iota DeviceANDROID DeviceIOS )
type HWBroadCastPayload ¶
type HWBroadCastPayload struct {
PayloadStr string `url:"payload,omitempty" json:"payload,omitempty"`
AccessToken string `url:"access_token,omitempty" json:"access_token,omitempty"`
NspSvc string `url:"nsp_svc,omitempty" json:"nsp_svc,omitempty"`
DeviceTokenStr string `url:"device_token_list,omitempty" json:"device_token_list,omitempty"`
DeviceTokens []string `url:"-" json:"-"`
ExpireTime int `url:"expire_time,omitempty" json:"expire_time,omitempty"`
NspTs int64 `url:"nsp_ts,omitempty" json:"nsp_ts,omitempty"`
Payload HWPayload `url:"-" json:"-"`
}
type HWPayload ¶
type HWPayload struct {
HPS struct {
Msg struct {
MsgType HuaWeiMsgType `json:"type,omitempty"`
Action struct {
ActionType HuaWeiMsgActionType `json:"type,omitempty"`
Param struct {
Intent string `json:"intent,omitempty"`
Url string `json:"url,omitempty"`
AppPkgName string `json:"appPkgName"`
} `json:"param,omitempty"`
} `json:"action,omitempty"`
Body struct {
Content string `json:"content"`
Title string `json:"title"`
} `json:"body"`
} `json:"msg"`
Ext struct {
BiTag string `json:"biTag,omitempty"`
Customize []map[string]string `json:"customize,omitempty"`
} `json:"ext,omitempty"`
} `json:"hps"`
}
type HWPushResponse ¶
type HWTokenResponse ¶
type HuaWeiMsgActionType ¶
type HuaWeiMsgActionType uint32
const ( HuaWeiMsgActionTypeNil HuaWeiMsgActionType = 0 HuaWeiMsgActionTypeCustom HuaWeiMsgActionType = 1 HuaWeiMsgActionTypeUrl HuaWeiMsgActionType = 3 HuaWeiMsgActionTypeApp HuaWeiMsgActionType = 3 )
type HuaWeiMsgType ¶
type HuaWeiMsgType uint32
const ( HuaWeiMsgTypeNil HuaWeiMsgType = 0 HuaWeiMsgTypeTransparent HuaWeiMsgType = 1 HuaWeiMsgTypeSystemNotifyAsync HuaWeiMsgType = 3 )
type HuaWeiPush ¶
type HuaWeiPush struct {
GrantType string `url:"grant_type,omitempty" json:"grant_type,omitempty"`
ClientId string `url:"client_id,omitempty" json:"client_id,omitempty"`
ClientSecret string `url:"client_secret,omitempty" json:"client_secret,omitempty"`
Scope string `url:"scope,omitempty" json:"scope,omitempty"` //nsp.auth nsp.user nsp.vfs nsp.ping openpush.message
AccessToken string `url:"-" json:"-"`
TokenExpiredAt int64 `url:"-" json:"-"`
AppPkgName string `url:"-" json:"-"`
NspCtx struct {
Ver string `json:"ver"`
AppId string `json:"appId"`
} `url:"-" json:"-"`
BroadCast HWBroadCastPayload
}
type IOSExtra ¶
type IOSExtra struct {
Custom string `url:"extra.payload,omitempty" json:"payload,omitempty"`
SoundUrl string `url:"extra.sound_url,omitempty" json:"sound_url,omitempty"`
Badge int `url:"extra.badge,omitempty" json:"badge,omitempty"`
Category int `url:"extra.category,omitempty" json:"category,omitempty"`
}
type MeiZuMsgNotification ¶
type MeiZuMsgNotification struct {
PushTimeInfo PushTimeInfo `json:"pushTimeInfo,omitempty"`
NoticeBarInfo struct {
Title string `json:"title,omitempty"`
Content string `json:"content,omitempty"`
} `json:"noticeBarInfo,omitempty"`
ClickTypeInfo struct {
ClickType int `json:"clickType"`
Url string `json:"url,omitempty"`
Parameters string `json:"parameters,omitempty"`
Activity string `json:"activity,omitempty"`
} `json:"clickTypeInfo,omitempty"`
AdvanceInfo struct {
Suspend int `json:"suspend,omitempty"`
ClearNoticeBar int `json:"clearNoticeBar,omitempty"`
FixDisplay int `json:"fixDisplay,omitempty"`
FixStartDisplayTime string `json:"fixStartDisplayTime,omitempty"` //0000-00-00 00:00:00
FixEndDisplayTime string `json:"fixStartDisplayTime,omitempty"` //0000-00-00 00:00:00
NotificationType struct {
Vibrate int `json:"vibrate,omitempty"`
Lights int `json:"lights,omitempty"`
Sound int `json:"sound,omitempty"`
} `json:"notificationType,omitempty"`
} `json:"advanceInfo,omitempty"`
}
type MeiZuMsgTransparent ¶
type MeiZuMsgTransparent struct {
Content string `json:"content,omitempty"`
PushTimeInfo PushTimeInfo `json:"pushTimeInfo,omitempty"`
}
type MeiZuNotify ¶
type MeiZuNotify struct {
AppId string `url:"appId,omitempty" json:"appId,omitempty"`
Sign string `url:"sign,omitempty" json:"sign,omitempty"`
Alias string `url:"alias,omitempty" json:"alias,omitempty"` //逗号分隔,1000单次限制
PushIds string `url:"pushIds,omitempty" json:"pushIds,omitempty"` //逗号分隔,1000单次限制
PushType int `url:"pushType" json:"pushType"`
MessageJson string `url:"messageJson,omitempty" json:"messageJson,omitempty"`
MsgTransparent MeiZuMsgTransparent `url:"-" json:"-"`
MsgNotification MeiZuMsgNotification `url:"-" json:"-"`
}
type MeiZuPush ¶
type MeiZuPush struct {
AppId int
AppKey string
Notify MeiZuNotify
}
func (*MeiZuPush) PushBroadCast ¶
func (mz *MeiZuPush) PushBroadCast() (resp MeiZuResponse, err error)
func (*MeiZuPush) PushUniBatchCast ¶
func (mz *MeiZuPush) PushUniBatchCast() (resp MeiZuResponse, err error)
type MeiZuResponse ¶
type MeiZuResponse struct {
Code int `json:"code"`
Msg string `json:"message"`
Redirect string `json:"redirect,omitempty"`
Data struct {
AppId int `json:"appId,omitempty"`
TaskId int `json:"taskId,omitempty"`
PushType int `json:"pushType,omitempty"`
MsgId string `json:"msgId,omitempty"`
RespTarget map[string][]string `json:"respTarget,omitempty"`
Logs map[string]string `json:"logs,omitempty"`
} `json:"value"`
}
type OPPOBroadCastResponse ¶
type OPPOClickType ¶
type OPPOClickType int
const ( OPPOClickTypeStartup OPPOClickType = 0 OPPOClickTypeActivityAction OPPOClickType = 1 OPPOClickTypeWeb OPPOClickType = 2 OPPOClickTypeActivity OPPOClickType = 4 OPPOClickTypeSchemeUrl OPPOClickType = 5 )
type OPPOCommonResponse ¶
type OPPONotifyPayload ¶
type OPPONotifyPayload struct {
AppMessageId string `url:"app_message_id" json:"app_message_id,omitempty"`
Title string `url:"title" json:"title"`
SubTitle string `url:"sub_title" json:"sub_title"`
Content string `url:"content" json:"content"`
ClickActionType OPPOClickType `url:"click_action_type,omitempty" json:"click_action_type,omitempty"`
ClickActionActivity string `url:"click_action_activity,omitempty" json:"click_action_activity,omitempty"`
ClickActionUrl string `url:"click_action_url,omitempty" json:"click_action_url,omitempty"`
ActionParameters string `url:"action_parameters,omitempty" json:"action_parameters,omitempty"`
ShowTimeType int `url:"show_time_type,omitempty" json:"show_time_type,omitempty"`
ShowStartTime int64 `url:"show_start_time,omitempty" json:"show_start_time,omitempty"`
ShowEndTime int64 `url:"show_end_time,omitempty" json:"show_end_time,omitempty"`
OffLine bool `url:"off_line,omitempty" json:"off_line,omitempty"`
OffLineTtl int `url:"off_line_ttl,omitempty" json:"off_line_ttl,omitempty"`
PushTimeType int `url:"push_time_type,omitempty" json:"push_time_type,omitempty"`
PushStartTime int64 `url:"push_start_time,omitempty" json:"push_start_time,omitempty"`
TimeZone string `url:"time_zone,omitempty" json:"time_zone,omitempty"`
FixSpeed bool `url:"fix_speed,omitempty" json:"fix_speed,omitempty"`
FixSpeedRate int64 `url:"fix_speed_rate,omitempty" json:"fix_speed_rate,omitempty"`
NetWorkType int `url:"net_work_type,omitempty" json:"net_work_type,omitempty"`
CallBackUrl string `url:"call_back_url,omitempty" json:"call_back_url,omitempty"`
CallBackParameter string `url:"call_back_parameter,omitempty" json:"call_back_parameter,omitempty"`
}
type OPPOPush ¶
type OPPOPush struct {
AuthToken string `url:"-" json:"-"`
TokenCreatedAt int64 `url:"-" json:"-"`
MasterKey string `url:"-" json:"-"`
IgnoreCheckToken bool `url:"-" json:"-"`
Sign string `url:"sign,omitempty" json:"sign"`
AppKey string `url:"app_key,omitempty" json:"app_key"`
Timestamp int64 `url:"timestamp,omitempty" json:"timestamp"`
Notify OPPONotifyPayload `url:"-" json:"-"`
Broadcast BroadCastPayload `url:"-" json:"-"`
Unicast UniCastPayload `url:"-" json:"-"`
UniBatchcast UniBatchCastPayload `url:"-" json:"-"`
PushType OPPOPushType `url:"-" json:"-"`
}
func (*OPPOPush) PushBroadCast ¶
func (*OPPOPush) PushUniBatchCast ¶
func (*OPPOPush) PushUniCast ¶
func (*OPPOPush) SaveNotifyToOPPO ¶
type OPPOPushType ¶
type OPPOPushType uint32
const ( OPPOPushTypeNil OPPOPushType = 0 OPPOPushTypeAll OPPOPushType = 1 OPPOPushTypeRegistrationId OPPOPushType = 2 OPPOPushTypeAlias OPPOPushType = 3 )
type PlatformType ¶
type PlatformType uint32
const ( PlatformNil PlatformType = iota PlatformHUAWEI PlatformOPPO PlatformVIVO PlatformXIAOMI PlatformMEIZU )
type PushInterface ¶
type PushInterface interface {
// contains filtered or unexported methods
}
type PushTimeInfo ¶
type UniBatchCastPayload ¶
type UniBatchCastPayload struct {
Message string `url:"messages" json:"messages"`
Payload []UniCastPayloadBody `url:"-" json:"-"`
}
type UniCastPayload ¶
type UniCastPayload struct {
Message string `url:"message" json:"message"`
Payload UniCastPayloadBody `url:"-" json:"-"`
}
type UniCastPayloadBody ¶
type UniCastPayloadBody struct {
TargetType OPPOPushType `url:"target_type,omitempty" json:"target_type,omitempty"`
TargetValue string `url:"target_value,omitempty" json:"target_value,omitempty"`
RegistrationId string `url:"registration_id,omitempty" json:"registration_id,omitempty"`
Notification string `url:"notification,omitempty" json:"notification,omitempty"`
Notify OPPONotifyPayload `url:"-" json:"-"`
}
type VIVOCommonResponse ¶
type VIVONotifyOpenType ¶
type VIVONotifyOpenType uint32
const ( VIVOPushTypeAppHome VIVONotifyOpenType = 1 VIVOPushTypeUrl VIVONotifyOpenType = 2 VIVOPushTypeCustom VIVONotifyOpenType = 3 VIVOPushTypeAppActivity VIVONotifyOpenType = 4 )
type VIVONotifyPayload ¶
type VIVONotifyPayload struct {
RequestId string `url:"requestId,omitempty" json:"requestId,omitempty"`
RegIds []string `url:"regIds,omitempty" json:"regIds,omitempty"`
Aliases []string `url:"aliases,omitempty" json:"aliases,omitempty"`
TaskId string `url:"taskId,omitempty" json:"taskId,omitempty"`
RegId string `url:"regId,omitempty" json:"regId,omitempty"`
Alias string `url:"alias,omitempty" json:"alias,omitempty"`
Title string `url:"title,omitempty" json:"title,omitempty"`
Content string `url:"content,omitempty" json:"content,omitempty"`
NotifyType VIVONotifyType `url:"notifyType,omitempty" json:"notifyType,omitempty"`
TimeToLive int `url:"timeToLive,omitempty" json:"timeToLive,omitempty"`
SkipType VIVONotifyOpenType `url:"skipType,omitempty" json:"skipType,omitempty"`
SkipContent string `url:"skipContent,omitempty" json:"skipContent,omitempty"`
NetWorkType int `url:"networkType,omitempty" json:"networkType,omitempty"` //-1 不限,1:wifi
Extras map[string]string `url:"clientCustomMap,omitempty" json:"clientCustomMap,omitempty"`
Callback struct {
Callback string `url:"callback,omitempty" json:"callback"`
Parameters string `url:"callback.param,omitempty" json:"callback.param"`
} `url:"extra,omitempty" json:"extra,omitempty"`
}
type VIVONotifyType ¶
type VIVONotifyType uint32
const ( VIVOPushTypeNone VIVONotifyType = 1 VIVOPushTypeSound VIVONotifyType = 2 VIVOPushTypeVibrate VIVONotifyType = 3 VIVOPushTypeSoundAndVibrate VIVONotifyType = 4 )
type VIVOPush ¶
type VIVOPush struct {
AuthToken string `url:"-" json:"-"`
TokenCreatedAt int64 `url:"-" json:"-"`
AppSecretKey string `url:"-" json:"-"`
IgnoreCheckToken bool `url:"-" json:"-"`
Sign string `url:"sign,omitempty" json:"sign,omitempty"`
AppId int `url:"appId,omitempty" json:"appId,omitempty"`
AppKey string `url:"appKey,omitempty" json:"appKey,omitempty"`
Timestamp int64 `url:"timestamp,omitempty" json:"timestamp,omitempty"`
Notify VIVONotifyPayload `url:"-" json:"-"`
}
func (*VIVOPush) PushBroadCast ¶
func (*VIVOPush) PushUniBatchCast ¶
func (*VIVOPush) PushUniCast ¶
func (*VIVOPush) SaveNotifyToVIVO ¶
type VIVOPushType ¶
type VIVOPushType uint32
const ( VIVOPushTypeAll VIVOPushType = 1 VIVOPushTypeRegistrationId VIVOPushType = 2 VIVOPushTypeAlias VIVOPushType = 3 )
type XMCommonResp ¶
type XMNotifyEffectType ¶
type XMNotifyEffectType uint32
const ( XMNotifyEffectTypeCustom XMNotifyEffectType = 0 XMNotifyEffectTypeLaunch XMNotifyEffectType = 1 XMNotifyEffectTypeWeb XMNotifyEffectType = 2 XMNotifyEffectTypeAppActivity XMNotifyEffectType = 3 )
type XMNotifyType ¶
type XMNotifyType int32
const ( XMNotifyTypeAll XMNotifyType = -1 XMNotifyTypeSound XMNotifyType = 1 XMNotifyTypeVibrate XMNotifyType = 2 XMNotifyTypeLights XMNotifyType = 4 )
type XMPayload ¶
type XMPayload struct {
Title string `url:"title,omitempty" json:"title,omitempty"` //长度16字节
Description string `url:"description,omitempty" json:"description,omitempty"` //长度128字节
Content string `url:"payload,omitempty" json:"payload,omitempty"` //长度4k
AppPkgName string `url:"restricted_package_name,omitempty" json:"restricted_package_name,omitempty"`
MsgType XMMsgType `url:"pass_through" json:"pass_through"`
NotifyType XMNotifyType `url:"notify_type,omitempty" json:"notify_type,omitempty"`
NotifyId int `url:"notify_id,omitempty" json:"notify_id,omitempty"`
TimeToLive int64 `url:"time_to_live,omitempty" json:"time_to_live,omitempty"`
TimeToSend int64 `url:"time_to_send,omitempty" json:"time_to_send,omitempty"`
RegistrationId string `url:"registration_id,omitempty" json:"registration_id,omitempty"` //多个逗号分隔
Alias string `url:"alias,omitempty" json:"alias,omitempty"` //多个逗号分隔
UserAccount string `url:"user_account,omitempty" json:"user_account,omitempty"`
Topic string `url:"topic,omitempty" json:"topic,omitempty"`
Topics string `url:"topics,omitempty" json:"topics,omitempty"` //多个$分隔
TopicOP string `url:"topic_op,omitempty" json:"topic_op,omitempty"`
Extra interface{} `url:"-" json:"-"`
ExtraCustom map[string]string `url:"-" json:"-"`
}
type XiaoMiPush ¶
type XiaoMiPush struct {
AppSecret string `url:"-" json:"-"`
AppPkgName string `url:"-" json:"app_pkg_name"`
DeviceType DeviceType `url:"-" json:"-"`
Payload XMPayload `url:"-" json:"-"`
}
func (*XiaoMiPush) PushBroadCast ¶
func (xm *XiaoMiPush) PushBroadCast() (id string, err error)
func (*XiaoMiPush) PushUniBatchCast ¶
func (xm *XiaoMiPush) PushUniBatchCast() (id string, err error)
Click to show internal directories.
Click to hide internal directories.