Documentation
¶
Index ¶
- Variables
- func ApplyRobotAddUser(robotSerialNo, userWexinId string, client *UchatClient) error
- func ConvertUchatMessageToMsgpack(b []byte) ([][]byte, error)
- func SetChatRoomCloseGetMessage(chatRoomSerialNo string, client *UchatClient) error
- func SetChatRoomOpenGetMessage(chatRoomSerialNo string, client *UchatClient) error
- func SetChatRoomOver(chatRoomSerialNo, comment string, client *UchatClient) error
- type UchatClient
- func (c *UchatClient) ApplyCodeList(ctx map[string]string) ([]map[string]string, error)
- func (c *UchatClient) ChatRoomCloseGetMessages(ctx map[string]string) error
- func (c *UchatClient) ChatRoomList(ctx map[string]string) ([]map[string]string, error)
- func (c *UchatClient) ChatRoomOpenGetMessages(ctx map[string]string) error
- func (c *UchatClient) ChatRoomOver(ctx map[string]string) error
- func (c *UchatClient) ChatRoomStatus(ctx map[string]string) (map[string]string, error)
- func (c *UchatClient) ChatRoomUserInfo(ctx map[string]string) error
- func (c *UchatClient) Do(action string, ctx interface{}) ([]byte, error)
- func (c *UchatClient) RobotAddUser(ctx map[string]string) error
- func (c *UchatClient) RobotList() ([]map[string]string, error)
- func (c *UchatClient) ScanGlobalResultList(key string, data []byte, err error) ([]map[string]string, error)
- func (c *UchatClient) SendMessage(ctx map[string]interface{}) error
- func (c *UchatClient) Sign(strCtx string) string
- type UchatClientGlobalResultList
- type UchatClientResult
- type UchatKeyword
- type UchatMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UchatApiPrefix string = "http://skyagent.shequnguanjia.com/Merchant.asmx" UchatTimeZone string = "Asia/Shanghai" UchatTimeLocation *time.Location )
Functions ¶
func ApplyRobotAddUser ¶
func ApplyRobotAddUser(robotSerialNo, userWexinId string, client *UchatClient) error
func ConvertUchatMessageToMsgpack ¶
转换Uchat Message数据为Msgpack格式
func SetChatRoomCloseGetMessage ¶
func SetChatRoomCloseGetMessage(chatRoomSerialNo string, client *UchatClient) error
群内时时消息关闭设置
func SetChatRoomOpenGetMessage ¶
func SetChatRoomOpenGetMessage(chatRoomSerialNo string, client *UchatClient) error
群内时时消息开启设置
func SetChatRoomOver ¶
func SetChatRoomOver(chatRoomSerialNo, comment string, client *UchatClient) error
关群调用
Types ¶
type UchatClient ¶
type UchatClient struct {
MarchantNo string
MarchantSecret string
Error error
DefaultTimeout time.Duration
}
小U机器客户端
func (*UchatClient) ApplyCodeList ¶
获取验证码
func (*UchatClient) ChatRoomCloseGetMessages ¶
func (c *UchatClient) ChatRoomCloseGetMessages(ctx map[string]string) error
关闭时时群信息
func (*UchatClient) ChatRoomList ¶
获取设备群列表
func (*UchatClient) ChatRoomOpenGetMessages ¶
func (c *UchatClient) ChatRoomOpenGetMessages(ctx map[string]string) error
开启时时群信息
func (*UchatClient) ChatRoomOver ¶
func (c *UchatClient) ChatRoomOver(ctx map[string]string) error
关闭群
func (*UchatClient) ChatRoomStatus ¶
查询群状态接口
func (*UchatClient) ChatRoomUserInfo ¶
func (c *UchatClient) ChatRoomUserInfo(ctx map[string]string) error
发起群会员列表回调
func (*UchatClient) Do ¶
func (c *UchatClient) Do(action string, ctx interface{}) ([]byte, error)
发送请求
func (*UchatClient) RobotAddUser ¶
func (c *UchatClient) RobotAddUser(ctx map[string]string) error
机器人添加用户好友
func (*UchatClient) RobotList ¶
func (c *UchatClient) RobotList() ([]map[string]string, error)
获取设备列表
func (*UchatClient) ScanGlobalResultList ¶
func (c *UchatClient) ScanGlobalResultList(key string, data []byte, err error) ([]map[string]string, error)
全局
func (*UchatClient) SendMessage ¶
func (c *UchatClient) SendMessage(ctx map[string]interface{}) error
群推送消息
type UchatClientGlobalResultList ¶
type UchatClientGlobalResultList map[string]interface{}
type UchatClientResult ¶
type UchatClientResult struct {
Result string `json:"nResult"`
Error string `json:"vcResult"`
Data []interface{} `json:"data"`
}
小U机器接口返回格式
type UchatKeyword ¶
type UchatKeyword struct {
LogSerialNo string
ChatRoomSerialNo string
FromWxUserSerialNo string
ToWxUserSerialNo string
Content string
ExtraData interface{} //补充数据,并非接口返回
}
keyword msgpack
func ConvertUchatKeyword ¶
func ConvertUchatKeyword(b []byte) ([]*UchatKeyword, error)
type UchatMessage ¶
type UchatMessage struct {
MerchantNo string
LogSerialNo string
ChatRoomSerialNo string
WxUserSerialNo string
MsgTime time.Time
MsgType int32
Content string
VoiceTime int32
ExtraData interface{} //补充数据,并非接口返回
}
func ConvertUchatMessage ¶
func ConvertUchatMessage(b []byte) ([]*UchatMessage, error)
Click to show internal directories.
Click to hide internal directories.