106 lines
3.5 KiB
Go
106 lines
3.5 KiB
Go
package docker
|
|
|
|
import "gitee.ltd/lxh/wechat-robot/internal/types"
|
|
|
|
// BaseResponse API响应结构
|
|
type BaseResponse[T any] struct {
|
|
Success bool `json:"Success"`
|
|
Code int `json:"Code"`
|
|
Message string `json:"Message"`
|
|
Data T `json:"Data"`
|
|
}
|
|
|
|
// QRCodeResponse 获取二维码响应
|
|
type QRCodeResponse struct {
|
|
UUID string `json:"Uuid"`
|
|
ExpiredTime string `json:"ExpiredTime"`
|
|
QRCodeBase64 string `json:"QRCodeBase64"`
|
|
QRCodeURL string `json:"QRCodeURL"`
|
|
}
|
|
|
|
// CheckUuidResponse 检查二维码状态响应
|
|
type CheckUuidResponse struct {
|
|
Uuid string `json:"uuid"`
|
|
Status int `json:"status"` // 状态
|
|
PushLoginUrlExpiredTime int `json:"pushLoginUrlexpiredTime"` // 推送登录url过期时间
|
|
ExpiredTime int `json:"expiredTime"` // 过期时间(秒)
|
|
HeadImgUrl string `json:"headImgUrl"` // 头像
|
|
NickName string `json:"nickName"` // 昵称
|
|
AcctSectResp map[string]any `json:"acctSectResp"` // 账号信息-登录成功之后才有
|
|
}
|
|
|
|
// AwakenLoginResponse 唤醒登录响应
|
|
type AwakenLoginResponse struct {
|
|
QrCodeResponse struct {
|
|
BaseResponse any `json:"BaseResponse"`
|
|
BlueToothBroadCastContent any `json:"BlueToothBroadCastContent"`
|
|
BlueToothBroadCastUuid string `json:"BlueToothBroadCastUuid"`
|
|
CheckTime int `json:"CheckTime"`
|
|
ExpiredTime int `json:"ExpiredTime"`
|
|
NotifyKey any `json:"NotifyKey"`
|
|
Uuid string `json:"Uuid"`
|
|
} `json:"QrCodeResponse"`
|
|
}
|
|
|
|
// AutoHeartbeatResponse 心跳响应
|
|
type AutoHeartbeatResponse struct {
|
|
Success bool `json:"success"`
|
|
Message string `json:"message"`
|
|
Data struct{}
|
|
}
|
|
|
|
// AutoHeartbeatStatusResponse 心跳状态响应
|
|
type AutoHeartbeatStatusResponse struct {
|
|
Success bool `json:"success"`
|
|
Message string `json:"message"`
|
|
Running bool `json:"running"`
|
|
}
|
|
|
|
// Sync
|
|
// @description: 同步微信消息返回值
|
|
type Sync struct {
|
|
ModUserInfos any `json:"ModUserInfos"`
|
|
ModContacts any `json:"ModContacts"`
|
|
DelContacts any `json:"DelContacts"`
|
|
ModUserImgs any `json:"ModUserImgs"`
|
|
FunctionSwitchs any `json:"FunctionSwitchs"`
|
|
UserInfoExts any `json:"UserInfoExts"`
|
|
AddMsgs []Message `json:"AddMsgs"`
|
|
ContinueFlag int `json:"ContinueFlag"`
|
|
KeyBuf struct {
|
|
ILen int `json:"iLen"`
|
|
Buffer string `json:"buffer"`
|
|
} `json:"KeyBuf"`
|
|
Status int `json:"Status"`
|
|
Continue int `json:"Continue"`
|
|
Time int `json:"Time"`
|
|
UnknownCmdId string `json:"UnknownCmdId"`
|
|
Remarks string `json:"Remarks"`
|
|
}
|
|
|
|
// Message
|
|
// @description: 微信消息
|
|
type Message struct {
|
|
MsgId int `json:"MsgId"`
|
|
FromUserName struct {
|
|
String string `json:"string"`
|
|
} `json:"FromUserName"`
|
|
ToWxid struct {
|
|
String string `json:"string"`
|
|
} `json:"ToWxid"`
|
|
MsgType types.MessageType `json:"MsgType"`
|
|
Content struct {
|
|
String string `json:"string"`
|
|
} `json:"Content"`
|
|
Status int `json:"Status"`
|
|
ImgStatus int `json:"ImgStatus"`
|
|
ImgBuf struct {
|
|
ILen int `json:"iLen"`
|
|
} `json:"ImgBuf"`
|
|
CreateTime int `json:"CreateTime"`
|
|
MsgSource string `json:"MsgSource"`
|
|
NewMsgId int64 `json:"NewMsgId"`
|
|
MsgSeq int `json:"MsgSeq"`
|
|
PushContent string `json:"PushContent,omitempty"`
|
|
}
|