-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
368 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package callbacks | ||
|
||
import "encoding/xml" | ||
|
||
// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url | ||
// 文档: https://developer.work.weixin.qq.com/document/path/97299#使用量已经耗尽事件 | ||
|
||
func init() { | ||
//添加可解析的回调事件 | ||
supportCallback(EventCustomerAcquisitionBalanceExhausted{}) | ||
} | ||
|
||
type EventCustomerAcquisitionBalanceExhausted struct { | ||
XMLName xml.Name `xml:"xml"` | ||
Text string `xml:",chardata"` | ||
ToUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ToUserName"` | ||
FromUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"FromUserName"` | ||
CreateTime struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"CreateTime"` | ||
MsgType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"MsgType"` | ||
Event struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"Event"` | ||
ChangeType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ChangeType"` | ||
} | ||
|
||
func (EventCustomerAcquisitionBalanceExhausted) GetMessageType() string { | ||
return "event" | ||
} | ||
|
||
func (EventCustomerAcquisitionBalanceExhausted) GetEventType() string { | ||
return "customer_acquisition" | ||
} | ||
|
||
func (EventCustomerAcquisitionBalanceExhausted) GetChangeType() string { | ||
return "balance_exhausted" | ||
} | ||
|
||
func (m EventCustomerAcquisitionBalanceExhausted) GetTypeKey() string { | ||
return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() | ||
} | ||
|
||
func (EventCustomerAcquisitionBalanceExhausted) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { | ||
var temp EventCustomerAcquisitionBalanceExhausted | ||
err := xml.Unmarshal(data, &temp) | ||
return temp, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package callbacks | ||
|
||
import "encoding/xml" | ||
|
||
// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url | ||
// 文档: https://developer.work.weixin.qq.com/document/path/97299#删除获客链接事件 | ||
|
||
func init() { | ||
//添加可解析的回调事件 | ||
supportCallback(EventCustomerAcquisitionDeleteLink{}) | ||
} | ||
|
||
type EventCustomerAcquisitionDeleteLink struct { | ||
XMLName xml.Name `xml:"xml"` | ||
Text string `xml:",chardata"` | ||
ToUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ToUserName"` | ||
FromUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"FromUserName"` | ||
CreateTime struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"CreateTime"` | ||
MsgType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"MsgType"` | ||
Event struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"Event"` | ||
ChangeType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ChangeType"` | ||
LinkId struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"LinkId"` | ||
} | ||
|
||
func (EventCustomerAcquisitionDeleteLink) GetMessageType() string { | ||
return "event" | ||
} | ||
|
||
func (EventCustomerAcquisitionDeleteLink) GetEventType() string { | ||
return "customer_acquisition" | ||
} | ||
|
||
func (EventCustomerAcquisitionDeleteLink) GetChangeType() string { | ||
return "delete_link" | ||
} | ||
|
||
func (m EventCustomerAcquisitionDeleteLink) GetTypeKey() string { | ||
return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() | ||
} | ||
|
||
func (EventCustomerAcquisitionDeleteLink) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { | ||
var temp EventCustomerAcquisitionDeleteLink | ||
err := xml.Unmarshal(data, &temp) | ||
return temp, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package callbacks | ||
|
||
import "encoding/xml" | ||
|
||
// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url | ||
// 文档: https://developer.work.weixin.qq.com/document/path/97299#微信客户发起会话事件 | ||
|
||
func init() { | ||
//添加可解析的回调事件 | ||
supportCallback(EventCustomerAcquisitionCustomerStartChat{}) | ||
} | ||
|
||
type EventCustomerAcquisitionCustomerStartChat struct { | ||
XMLName xml.Name `xml:"xml"` | ||
Text string `xml:",chardata"` | ||
ToUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ToUserName"` | ||
FromUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"FromUserName"` | ||
CreateTime struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"CreateTime"` | ||
MsgType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"MsgType"` | ||
Event struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"Event"` | ||
ChangeType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ChangeType"` | ||
UserID struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"UserID"` | ||
ExternalUserID struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ExternalUserID"` | ||
} | ||
|
||
func (EventCustomerAcquisitionCustomerStartChat) GetMessageType() string { | ||
return "event" | ||
} | ||
|
||
func (EventCustomerAcquisitionCustomerStartChat) GetEventType() string { | ||
return "customer_acquisition" | ||
} | ||
|
||
func (EventCustomerAcquisitionCustomerStartChat) GetChangeType() string { | ||
return "customer_start_chat" | ||
} | ||
|
||
func (m EventCustomerAcquisitionCustomerStartChat) GetTypeKey() string { | ||
return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() | ||
} | ||
|
||
func (EventCustomerAcquisitionCustomerStartChat) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { | ||
var temp EventCustomerAcquisitionCustomerStartChat | ||
err := xml.Unmarshal(data, &temp) | ||
return temp, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package callbacks | ||
|
||
import "encoding/xml" | ||
|
||
// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url | ||
// 文档: https://developer.work.weixin.qq.com/document/path/97299#获客链接不可用事件 | ||
|
||
func init() { | ||
//添加可解析的回调事件 | ||
supportCallback(EventCustomerAcquisitionLinkUnavailable{}) | ||
} | ||
|
||
type EventCustomerAcquisitionLinkUnavailable struct { | ||
XMLName xml.Name `xml:"xml"` | ||
Text string `xml:",chardata"` | ||
ToUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ToUserName"` | ||
FromUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"FromUserName"` | ||
CreateTime struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"CreateTime"` | ||
MsgType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"MsgType"` | ||
Event struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"Event"` | ||
ChangeType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ChangeType"` | ||
LinkId struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"LinkId"` | ||
} | ||
|
||
func (EventCustomerAcquisitionLinkUnavailable) GetMessageType() string { | ||
return "event" | ||
} | ||
|
||
func (EventCustomerAcquisitionLinkUnavailable) GetEventType() string { | ||
return "customer_acquisition" | ||
} | ||
|
||
func (EventCustomerAcquisitionLinkUnavailable) GetChangeType() string { | ||
return "link_unavailable" | ||
} | ||
|
||
func (m EventCustomerAcquisitionLinkUnavailable) GetTypeKey() string { | ||
return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() | ||
} | ||
|
||
func (EventCustomerAcquisitionLinkUnavailable) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { | ||
var temp EventCustomerAcquisitionLinkUnavailable | ||
err := xml.Unmarshal(data, &temp) | ||
return temp, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package callbacks | ||
|
||
import "encoding/xml" | ||
|
||
// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url | ||
// 文档: https://developer.work.weixin.qq.com/document/path/97299#获客额度即将耗尽事件 | ||
|
||
func init() { | ||
//添加可解析的回调事件 | ||
supportCallback(EventCustomerAcquisitionBalanceLow{}) | ||
} | ||
|
||
type EventCustomerAcquisitionBalanceLow struct { | ||
XMLName xml.Name `xml:"xml"` | ||
Text string `xml:",chardata"` | ||
ToUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ToUserName"` | ||
FromUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"FromUserName"` | ||
CreateTime struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"CreateTime"` | ||
MsgType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"MsgType"` | ||
Event struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"Event"` | ||
ChangeType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ChangeType"` | ||
} | ||
|
||
func (EventCustomerAcquisitionBalanceLow) GetMessageType() string { | ||
return "event" | ||
} | ||
|
||
func (EventCustomerAcquisitionBalanceLow) GetEventType() string { | ||
return "customer_acquisition" | ||
} | ||
|
||
func (EventCustomerAcquisitionBalanceLow) GetChangeType() string { | ||
return "balance_low" | ||
} | ||
|
||
func (m EventCustomerAcquisitionBalanceLow) GetTypeKey() string { | ||
return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() | ||
} | ||
|
||
func (EventCustomerAcquisitionBalanceLow) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { | ||
var temp EventCustomerAcquisitionBalanceLow | ||
err := xml.Unmarshal(data, &temp) | ||
return temp, err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package callbacks | ||
|
||
import "encoding/xml" | ||
|
||
// 自动生成的回调结构,按需修改, 生成方式: make callback doc=微信文档地址url | ||
// 文档: https://developer.work.weixin.qq.com/document/path/97299#通过获客链接申请好友事件 | ||
|
||
func init() { | ||
//添加可解析的回调事件 | ||
supportCallback(EventCustomerAcquisitionFriendRequest{}) | ||
} | ||
|
||
type EventCustomerAcquisitionFriendRequest struct { | ||
XMLName xml.Name `xml:"xml"` | ||
Text string `xml:",chardata"` | ||
ToUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ToUserName"` | ||
FromUserName struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"FromUserName"` | ||
CreateTime struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"CreateTime"` | ||
MsgType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"MsgType"` | ||
Event struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"Event"` | ||
ChangeType struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"ChangeType"` | ||
LinkId struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"LinkId"` | ||
State struct { | ||
Text string `xml:",chardata"` | ||
} `xml:"State"` | ||
} | ||
|
||
func (EventCustomerAcquisitionFriendRequest) GetMessageType() string { | ||
return "event" | ||
} | ||
|
||
func (EventCustomerAcquisitionFriendRequest) GetEventType() string { | ||
return "customer_acquisition" | ||
} | ||
|
||
func (EventCustomerAcquisitionFriendRequest) GetChangeType() string { | ||
return "friend_request" | ||
} | ||
|
||
func (m EventCustomerAcquisitionFriendRequest) GetTypeKey() string { | ||
return m.GetMessageType() + ":" + m.GetEventType() + ":" + m.GetChangeType() | ||
} | ||
|
||
func (EventCustomerAcquisitionFriendRequest) ParseFromXml(data []byte) (CallBackExtraInfoInterface, error) { | ||
var temp EventCustomerAcquisitionFriendRequest | ||
err := xml.Unmarshal(data, &temp) | ||
return temp, err | ||
} |