Documentation
¶
Index ¶
- Variables
- func CommonParams(pmtp *PushMsgParameter) url.Values
- func GetAliSignature(par *PushMsgParameter) (string, url.Values)
- func PushMessage(action string, users interface{}, m *PushClientMessage) (bool, *res)
- func Signature(key, resource string) (signature string, err error)
- type AliPushMsg
- type AliRespInfo
- func AddAliMessageTag(action string, tagname string, clientKey string) (bool, *AliRespInfo)
- func AliPushMessage(action string, users interface{}, client_msg *AliPushMsg) (bool, *AliRespInfo)
- func AliPushNotice(action string, users interface{}, client_msg *AliPushMsg) (bool, *AliRespInfo)
- func Ali_resp_to_unmarshal(resp *http.Response) (bool, *AliRespInfo)
- func QueryTags(clientKey, keyType string) (bool, *AliRespInfo)
- func TagList() (bool, *AliRespInfo)
- func UnbindTag(clientKey string, tags ...string) (bool, *AliRespInfo)
- type PushClientMessage
- type PushMsgParameter
- type TagInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BIND_Tag = "BindTag" UNBIND_Tag = "UnbindTag" LIST_Tags = "ListTags" QUERY_Tags = "QueryTags" )
View Source
var ( AliCloudAppKey = "23665956" // 23636409 AliCloudAccessKeyId = "WC9nreih4P8Mbwwz" AlicloudAppSecret = "HVllgK8DF9pvURVnTm0dtbFIqS8e6l" )
Functions ¶
func GetAliSignature ¶
func GetAliSignature(par *PushMsgParameter) (string, url.Values)
func PushMessage ¶
func PushMessage(action string, users interface{}, m *PushClientMessage) (bool, *res)
Types ¶
type AliPushMsg ¶
type AliPushMsg struct {
ClientMsg PushClientMessage
}
func (*AliPushMsg) SendDelayedmsg ¶
func (a *AliPushMsg) SendDelayedmsg(target string) bool
type AliRespInfo ¶
type AliRespInfo struct {
Code string
Message string
RequestId string
MessageId string
HostId string
}
func AddAliMessageTag ¶
func AddAliMessageTag(action string, tagname string, clientKey string) (bool, *AliRespInfo)
AddAliMessageTag 添加Tag
func AliPushMessage ¶
func AliPushMessage(action string, users interface{}, client_msg *AliPushMsg) (bool, *AliRespInfo)
func AliPushNotice ¶
func AliPushNotice(action string, users interface{}, client_msg *AliPushMsg) (bool, *AliRespInfo)
func Ali_resp_to_unmarshal ¶
func Ali_resp_to_unmarshal(resp *http.Response) (bool, *AliRespInfo)
xml 解析
func QueryTags ¶
func QueryTags(clientKey, keyType string) (bool, *AliRespInfo)
QueryTags 查询某个对象的Tag列表
type PushClientMessage ¶
type PushClientMessage struct {
Id int64
NamePerson string
Birthday string
Name string
FromName string
FromUserName string
RoomName string
Logo string
MsgFromType string
MsgType string
MsgNotificationStr string
Img string
Title string
NoticeTitle string
Summary string
Content string
Status bool
IsClick bool //可点
CreateDate time.Time
ResponseDate time.Time
}
type PushMsgParameter ¶
type PushMsgParameter struct {
AccessKeyId string
Action string
RegionId string
//Devices string
Signature string
SignatureNonce string
SignatureVersion string
SignatureMethod string // = HMAC-SHA1
Version string
Timestamp string
AppKey string
Target string // 推送目标类别 :DEVICE:根据设备推送 ACCOUNT:根据账号推送 ALIAS:根据别名推送 TAG:根据标签推送 ALL:推送给全部设备
TargetValue string //
//tag
TagName string
ClientKey string // 接受者
KeyType string // Tag推送的 推送类型
DeviceType string // 设备类别 : all
PushType string // 消息类别: 1:msg 2: notice
Title string // 消息头
Body string // 消息内容
ApnsEnv string
IOSApnsEnv string // IOS APNs 环境 DEV表示开发环境,PRODUCT表示生产环境
ExtParameters string // 自定义消息结构 json串
AndroidExtParameters string // 消息 andriod
AndroidNotificationBarType int // andriod 通知栏样式
StoreOffline string // 用户不在线,72小时内会重新发送消息
//AndroidOpenType string // Activity 有效
AndroidActivity string
AndroidXiaoMiActivity string
AndroidXiaoMiNotifyTitle string
AndroidXiaoMiNotifyBody string
// contains filtered or unexported fields
}
push message 请求参数
Click to show internal directories.
Click to hide internal directories.