Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigHarmony ¶ added in v1.2.12
type ConfigHarmony struct {
JsonPath string `json:"jsonPath"`
ForegroundShow bool `json:"foregroundShow"`
}
ConfigHarmony 鸿蒙的配置
type ConfigHuawei ¶
type ConfigHuawei struct {
AppPkgName string `json:"appPkgName"` // 应用包名
ClientId string `json:"clientId"` // 用户在联盟申请的APPID
ClientSecret string `json:"clientSecret"` // 应用秘钥
}
ConfigHuawei 华为推送配置
type ConfigIosCert ¶
type ConfigIosCert struct {
CertPath string `json:"certPath"`
Password string `json:"password"`
CertPathBox string `json:"certPathBox"`
PasswordBox string `json:"passwordBox"`
}
ConfigIosCert ios的证书推送配置
type ConfigIosToken ¶
type ConfigIosToken struct {
TeamId string `json:"teamId"`
KeyId string `json:"keyId"`
SecretFile string `json:"secretFile"`
BundleId string `json:"bundleId"`
TeamIdBox string `json:"teamIdBox"`
KeyIdBox string `json:"keyIdBox"`
SecretFileBox string `json:"secretFileBox"`
BundleIdBox string `json:"bundleIdBox"`
}
ConfigIosToken IOS的token推送配置
type ConfigMeizu ¶
type ConfigMeizu struct {
AppPkgName string `json:"appPkgName"`
AppId string `json:"appId"`
AppSecret string `json:"appSecret"`
}
ConfigMeizu 魅族推送配置
type ConfigOppo ¶
type ConfigOppo struct {
AppPkgName string `json:"appPkgName"`
AppKey string `json:"appKey"`
MasterSecret string `json:"masterSecret"`
}
ConfigOppo oppo推送配置
type ConfigVivo ¶
type ConfigVivo struct {
AppPkgName string `json:"appPkgName"`
AppId string `json:"appId"`
AppKey string `json:"appKey"`
AppSecret string `json:"appSecret"`
}
ConfigVivo vivo 推送配置
type ConfigXiaomi ¶
type ConfigXiaomi struct {
AppPkgName string `json:"appPkgName"`
AppSecret string `json:"appSecret"`
}
ConfigXiaomi 小米推送配置
type Message ¶
type Message struct {
BusinessId string `json:"businessId"` // 业务ID
Title string `json:"title"` // 标题,建议不超过10个汉字
SubTitle string `json:"subTitle"` // 副标题,建议不超过10个汉字
Content string `json:"content"` // 内容,建议不超过20个汉字
Sound string `json:"sound"` // IOS语语音
Badge int `json:"badge"` // 应用角标数字[ios和安卓可以使用]
Extra map[string]string `json:"extra"` // 自定义消息。只支持一维
CallBack string `json:"callback"` // 送达回执地址,供推送厂商调用,最大128字节
CallbackParam string `json:"callbackParam"` // 自定义回执参数
}
type PlatformType ¶
type PlatformType string
const ( HuaweiPlatform PlatformType = "huawei" XiaomiPlatform PlatformType = "xiaomi" MeizuPlatform PlatformType = "meizu" VivoPlatform PlatformType = "vivo" OppoPlatform PlatformType = "oppo" IosCertPlatform PlatformType = "ios" IosTokenPlatform PlatformType = "ios-token" HarmonyPlatform PlatformType = "harmony" )
type PushClientInterface ¶
type PushConfig ¶
type PushConfig struct {
ConfigHuawei `json:"huawei"`
ConfigXiaomi `json:"xiaomi"`
ConfigMeizu `json:"meizu"`
ConfigOppo `json:"oppo"`
ConfigVivo `json:"vivo"`
ConfigIosCert `json:"ios"`
ConfigIosToken `json:"ios-token"`
ConfigHarmony `json:"harmony"`
}
type PushMessageRequest ¶
type PushMessageRequest struct {
DeviceTokens []string `json:"token"` // 设备列表
AccessToken string `json:"access_token,omitempty"` // 认证token
IsSandBox bool `json:"isSandbox"` // IOS沙箱环境[true:推送到沙箱环境,false:推送到正式环境]
Message *Message `json:"message"` // 消息
ExpireTime string `json:"expire_time,omitempty"` // 消息超时时间,必填
}
type PushMessageResponse ¶
type PushMessageResponse struct {
}
Click to show internal directories.
Click to hide internal directories.