mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
feature: group file system.
This commit is contained in:
parent
5fa25a7f74
commit
d9e1c14a80
@ -1113,28 +1113,6 @@ func (c *QQClient) buildQuitGroupPacket(groupCode int64) (uint16, []byte) {
|
|||||||
return seq, packet
|
return seq, packet
|
||||||
}
|
}
|
||||||
|
|
||||||
// OidbSvc.0x6d6_2
|
|
||||||
func (c *QQClient) buildGroupFileDownloadReqPacket(groupCode int64, fileId string, busId int32) (uint16, []byte) {
|
|
||||||
seq := c.nextSeq()
|
|
||||||
body := &oidb.D6D6ReqBody{
|
|
||||||
DownloadFileReq: &oidb.DownloadFileReqBody{
|
|
||||||
GroupCode: groupCode,
|
|
||||||
AppId: 3,
|
|
||||||
BusId: busId,
|
|
||||||
FileId: fileId,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
b, _ := proto.Marshal(body)
|
|
||||||
req := &oidb.OIDBSSOPkg{
|
|
||||||
Command: 1750,
|
|
||||||
ServiceType: 2,
|
|
||||||
Bodybuffer: b,
|
|
||||||
}
|
|
||||||
payload, _ := proto.Marshal(req)
|
|
||||||
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d6_2", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
|
||||||
return seq, packet
|
|
||||||
}
|
|
||||||
|
|
||||||
// OidbSvc.0xe07_0
|
// OidbSvc.0xe07_0
|
||||||
func (c *QQClient) buildImageOcrRequestPacket(url, md5 string, size, weight, height int32) (uint16, []byte) {
|
func (c *QQClient) buildImageOcrRequestPacket(url, md5 string, size, weight, height int32) (uint16, []byte) {
|
||||||
seq := c.nextSeq()
|
seq := c.nextSeq()
|
||||||
|
@ -152,6 +152,7 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
|
|||||||
"MultiMsg.ApplyUp": decodeMultiApplyUpResponse,
|
"MultiMsg.ApplyUp": decodeMultiApplyUpResponse,
|
||||||
"MultiMsg.ApplyDown": decodeMultiApplyDownResponse,
|
"MultiMsg.ApplyDown": decodeMultiApplyDownResponse,
|
||||||
"OidbSvc.0x6d6_2": decodeOIDB6d6Response,
|
"OidbSvc.0x6d6_2": decodeOIDB6d6Response,
|
||||||
|
"OidbSvc.0x6d8_1": decodeOIDB6d81Response,
|
||||||
"OidbSvc.0x88d_0": decodeGroupInfoResponse,
|
"OidbSvc.0x88d_0": decodeGroupInfoResponse,
|
||||||
"OidbSvc.0xe07_0": decodeImageOcrResponse,
|
"OidbSvc.0xe07_0": decodeImageOcrResponse,
|
||||||
"OidbSvc.0xd79": decodeWordSegmentation,
|
"OidbSvc.0xd79": decodeWordSegmentation,
|
||||||
@ -370,16 +371,6 @@ func (c *QQClient) GetShortVideoUrl(uuid, md5 []byte) string {
|
|||||||
return i.(string)
|
return i.(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *QQClient) GetGroupFileUrl(groupCode int64, fileId string, busId int32) string {
|
|
||||||
i, err := c.sendAndWait(c.buildGroupFileDownloadReqPacket(groupCode, fileId, busId))
|
|
||||||
if err != nil {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
url := i.(string)
|
|
||||||
url += "?fname=" + hex.EncodeToString([]byte(fileId))
|
|
||||||
return url
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *QQClient) GetGroupInfo(groupCode int64) (*GroupInfo, error) {
|
func (c *QQClient) GetGroupInfo(groupCode int64) (*GroupInfo, error) {
|
||||||
i, err := c.sendAndWait(c.buildGroupInfoRequestPacket(groupCode))
|
i, err := c.sendAndWait(c.buildGroupInfoRequestPacket(groupCode))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -992,21 +992,6 @@ func decodeWordSegmentation(_ *QQClient, _ uint16, payload []byte) (interface{},
|
|||||||
return nil, errors.New("no word receive")
|
return nil, errors.New("no word receive")
|
||||||
}
|
}
|
||||||
|
|
||||||
// OidbSvc.0x6d6_2
|
|
||||||
func decodeOIDB6d6Response(_ *QQClient, _ uint16, payload []byte) (interface{}, error) {
|
|
||||||
pkg := oidb.OIDBSSOPkg{}
|
|
||||||
rsp := oidb.D6D6RspBody{}
|
|
||||||
if err := proto.Unmarshal(payload, &pkg); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
ip := rsp.DownloadFileRsp.DownloadIp
|
|
||||||
url := hex.EncodeToString(rsp.DownloadFileRsp.DownloadUrl)
|
|
||||||
return fmt.Sprintf("http://%s/ftn_handler/%s/", ip, url), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// OidbSvc.0xe07_0
|
// OidbSvc.0xe07_0
|
||||||
func decodeImageOcrResponse(_ *QQClient, _ uint16, payload []byte) (interface{}, error) {
|
func decodeImageOcrResponse(_ *QQClient, _ uint16, payload []byte) (interface{}, error) {
|
||||||
pkg := oidb.OIDBSSOPkg{}
|
pkg := oidb.OIDBSSOPkg{}
|
||||||
|
257
client/group_file.go
Normal file
257
client/group_file.go
Normal file
@ -0,0 +1,257 @@
|
|||||||
|
package client
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/hex"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
|
||||||
|
"github.com/Mrs4s/MiraiGo/protocol/packets"
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
|
)
|
||||||
|
|
||||||
|
type (
|
||||||
|
GroupFileSystem struct {
|
||||||
|
FileCount uint32 `json:"file_count"`
|
||||||
|
LimitCount uint32 `json:"limit_count"`
|
||||||
|
UsedSpace uint64 `json:"used_space"`
|
||||||
|
TotalSpace uint64 `json:"total_space"`
|
||||||
|
GroupCode int64 `json:"group_id"`
|
||||||
|
|
||||||
|
client *QQClient
|
||||||
|
}
|
||||||
|
|
||||||
|
GroupFile struct {
|
||||||
|
GroupCode int64 `json:"group_id"`
|
||||||
|
FileId string `json:"file_id"`
|
||||||
|
FileName string `json:"file_name"`
|
||||||
|
BusId int32 `json:"busid"`
|
||||||
|
FileSize int64 `json:"file_size"`
|
||||||
|
UploadTime int64 `json:"upload_time"`
|
||||||
|
DeadTime int64 `json:"dead_time"`
|
||||||
|
ModifyTime int64 `json:"modify_time"`
|
||||||
|
DownloadTimes int64 `json:"download_times"`
|
||||||
|
Uploader int64 `json:"uploader"`
|
||||||
|
UploaderName string `json:"uploader_name"`
|
||||||
|
}
|
||||||
|
|
||||||
|
GroupFolder struct {
|
||||||
|
GroupCode int64 `json:"group_id"`
|
||||||
|
FolderId string `json:"folder_id"`
|
||||||
|
FolderName string `json:"folder_name"`
|
||||||
|
CreateTime int64 `json:"create_time"`
|
||||||
|
Creator int64 `json:"creator"`
|
||||||
|
CreatorName string `json:"creator_name"`
|
||||||
|
TotalFileCount uint32 `json:"total_file_count"`
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *QQClient) GetGroupFileSystem(groupCode int64) (fs *GroupFileSystem, err error) {
|
||||||
|
defer func() {
|
||||||
|
if pan := recover(); pan != nil {
|
||||||
|
c.Error("get group fs error: %v", pan)
|
||||||
|
err = errors.New("fs error")
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
g := c.FindGroup(groupCode)
|
||||||
|
if g == nil {
|
||||||
|
return nil, errors.New("group not found")
|
||||||
|
}
|
||||||
|
rsp, e := c.sendAndWait(c.buildGroupFileCountRequestPacket(groupCode))
|
||||||
|
if e != nil {
|
||||||
|
return nil, e
|
||||||
|
}
|
||||||
|
fs = &GroupFileSystem{
|
||||||
|
FileCount: rsp.(*oidb.D6D8RspBody).FileCountRsp.GetAllFileCount(),
|
||||||
|
LimitCount: rsp.(*oidb.D6D8RspBody).FileCountRsp.GetLimitCount(),
|
||||||
|
GroupCode: groupCode,
|
||||||
|
client: c,
|
||||||
|
}
|
||||||
|
rsp, err = c.sendAndWait(c.buildGroupFileSpaceRequestPacket(groupCode))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
fs.TotalSpace = rsp.(*oidb.D6D8RspBody).GroupSpaceRsp.GetTotalSpace()
|
||||||
|
fs.UsedSpace = rsp.(*oidb.D6D8RspBody).GroupSpaceRsp.GetUsedSpace()
|
||||||
|
return fs, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *QQClient) GetGroupFileUrl(groupCode int64, fileId string, busId int32) string {
|
||||||
|
i, err := c.sendAndWait(c.buildGroupFileDownloadReqPacket(groupCode, fileId, busId))
|
||||||
|
if err != nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
url := i.(string)
|
||||||
|
url += "?fname=" + hex.EncodeToString([]byte(fileId))
|
||||||
|
return url
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fs *GroupFileSystem) Root() ([]*GroupFile, []*GroupFolder, error) {
|
||||||
|
return fs.GetFilesByFolder("/")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fs *GroupFileSystem) GetFilesByFolder(folderId string) ([]*GroupFile, []*GroupFolder, error) {
|
||||||
|
var startIndex uint32 = 0
|
||||||
|
var files []*GroupFile
|
||||||
|
var folders []*GroupFolder
|
||||||
|
for {
|
||||||
|
i, err := fs.client.sendAndWait(fs.client.buildGroupFileListRequestPacket(fs.GroupCode, folderId, startIndex))
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
rsp := i.(*oidb.D6D8RspBody)
|
||||||
|
if rsp.FileListInfoRsp == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
for _, item := range rsp.FileListInfoRsp.ItemList {
|
||||||
|
if item.FileInfo != nil {
|
||||||
|
files = append(files, &GroupFile{
|
||||||
|
GroupCode: fs.GroupCode,
|
||||||
|
FileId: item.FileInfo.GetFileId(),
|
||||||
|
FileName: item.FileInfo.GetFileName(),
|
||||||
|
BusId: int32(item.FileInfo.GetBusId()),
|
||||||
|
FileSize: int64(item.FileInfo.GetFileSize()),
|
||||||
|
UploadTime: int64(item.FileInfo.GetUploadTime()),
|
||||||
|
DeadTime: int64(item.FileInfo.GetDeadTime()),
|
||||||
|
ModifyTime: int64(item.FileInfo.GetModifyTime()),
|
||||||
|
DownloadTimes: int64(item.FileInfo.GetDownloadTimes()),
|
||||||
|
Uploader: int64(item.FileInfo.GetUploaderUin()),
|
||||||
|
UploaderName: item.FileInfo.GetUploaderName(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if item.FolderInfo != nil {
|
||||||
|
folders = append(folders, &GroupFolder{
|
||||||
|
GroupCode: fs.GroupCode,
|
||||||
|
FolderId: item.FolderInfo.GetFolderId(),
|
||||||
|
FolderName: item.FolderInfo.GetFolderName(),
|
||||||
|
CreateTime: int64(item.FolderInfo.GetCreateTime()),
|
||||||
|
Creator: int64(item.FolderInfo.GetCreateUin()),
|
||||||
|
CreatorName: item.FolderInfo.GetCreatorName(),
|
||||||
|
TotalFileCount: item.FolderInfo.GetTotalFileCount(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if rsp.FileListInfoRsp.GetIsEnd() {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
startIndex = rsp.FileListInfoRsp.GetNextIndex()
|
||||||
|
}
|
||||||
|
return files, folders, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fs *GroupFileSystem) GetDownloadUrl(file *GroupFile) string {
|
||||||
|
return fs.client.GetGroupFileUrl(file.GroupCode, file.FileId, file.BusId)
|
||||||
|
}
|
||||||
|
|
||||||
|
// OidbSvc.0x6d8_1
|
||||||
|
func (c *QQClient) buildGroupFileListRequestPacket(groupCode int64, folderId string, startIndex uint32) (uint16, []byte) {
|
||||||
|
seq := c.nextSeq()
|
||||||
|
body := &oidb.D6D8ReqBody{FileListInfoReq: &oidb.GetFileListReqBody{
|
||||||
|
GroupCode: proto.Uint64(uint64(groupCode)),
|
||||||
|
AppId: proto.Uint32(3),
|
||||||
|
FolderId: &folderId,
|
||||||
|
FileCount: proto.Uint32(20),
|
||||||
|
AllFileCount: proto.Uint32(0),
|
||||||
|
ReqFrom: proto.Uint32(3),
|
||||||
|
SortBy: proto.Uint32(1),
|
||||||
|
FilterCode: proto.Uint32(0),
|
||||||
|
Uin: proto.Uint64(0),
|
||||||
|
StartIndex: &startIndex,
|
||||||
|
Context: EmptyBytes,
|
||||||
|
}}
|
||||||
|
b, _ := proto.Marshal(body)
|
||||||
|
req := &oidb.OIDBSSOPkg{
|
||||||
|
Command: 1752,
|
||||||
|
ServiceType: 1,
|
||||||
|
Bodybuffer: b,
|
||||||
|
ClientVersion: "android 8.4.8",
|
||||||
|
}
|
||||||
|
payload, _ := proto.Marshal(req)
|
||||||
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d8_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
|
return seq, packet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *QQClient) buildGroupFileCountRequestPacket(groupCode int64) (uint16, []byte) {
|
||||||
|
seq := c.nextSeq()
|
||||||
|
body := &oidb.D6D8ReqBody{GroupFileCountReq: &oidb.GetFileCountReqBody{
|
||||||
|
GroupCode: proto.Uint64(uint64(groupCode)),
|
||||||
|
AppId: proto.Uint32(3),
|
||||||
|
BusId: proto.Uint32(0),
|
||||||
|
}}
|
||||||
|
b, _ := proto.Marshal(body)
|
||||||
|
req := &oidb.OIDBSSOPkg{
|
||||||
|
Command: 1752,
|
||||||
|
ServiceType: 2,
|
||||||
|
Bodybuffer: b,
|
||||||
|
ClientVersion: "android 8.4.8",
|
||||||
|
}
|
||||||
|
payload, _ := proto.Marshal(req)
|
||||||
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d8_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
|
return seq, packet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *QQClient) buildGroupFileSpaceRequestPacket(groupCode int64) (uint16, []byte) {
|
||||||
|
seq := c.nextSeq()
|
||||||
|
body := &oidb.D6D8ReqBody{GroupSpaceReq: &oidb.GetSpaceReqBody{
|
||||||
|
GroupCode: proto.Uint64(uint64(groupCode)),
|
||||||
|
AppId: proto.Uint32(3),
|
||||||
|
}}
|
||||||
|
b, _ := proto.Marshal(body)
|
||||||
|
req := &oidb.OIDBSSOPkg{
|
||||||
|
Command: 1752,
|
||||||
|
ServiceType: 3,
|
||||||
|
Bodybuffer: b,
|
||||||
|
ClientVersion: "android 8.4.8",
|
||||||
|
}
|
||||||
|
payload, _ := proto.Marshal(req)
|
||||||
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d8_1", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
|
return seq, packet
|
||||||
|
}
|
||||||
|
|
||||||
|
// OidbSvc.0x6d6_2
|
||||||
|
func (c *QQClient) buildGroupFileDownloadReqPacket(groupCode int64, fileId string, busId int32) (uint16, []byte) {
|
||||||
|
seq := c.nextSeq()
|
||||||
|
body := &oidb.D6D6ReqBody{
|
||||||
|
DownloadFileReq: &oidb.DownloadFileReqBody{
|
||||||
|
GroupCode: groupCode,
|
||||||
|
AppId: 3,
|
||||||
|
BusId: busId,
|
||||||
|
FileId: fileId,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
b, _ := proto.Marshal(body)
|
||||||
|
req := &oidb.OIDBSSOPkg{
|
||||||
|
Command: 1750,
|
||||||
|
ServiceType: 2,
|
||||||
|
Bodybuffer: b,
|
||||||
|
}
|
||||||
|
payload, _ := proto.Marshal(req)
|
||||||
|
packet := packets.BuildUniPacket(c.Uin, seq, "OidbSvc.0x6d6_2", 1, c.OutGoingPacketSessionId, EmptyBytes, c.sigInfo.d2Key, payload)
|
||||||
|
return seq, packet
|
||||||
|
}
|
||||||
|
|
||||||
|
func decodeOIDB6d81Response(c *QQClient, _ uint16, payload []byte) (interface{}, error) {
|
||||||
|
pkg := oidb.OIDBSSOPkg{}
|
||||||
|
rsp := oidb.D6D8RspBody{}
|
||||||
|
if err := proto.Unmarshal(payload, &pkg); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &rsp, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// OidbSvc.0x6d6_2
|
||||||
|
func decodeOIDB6d6Response(_ *QQClient, _ uint16, payload []byte) (interface{}, error) {
|
||||||
|
pkg := oidb.OIDBSSOPkg{}
|
||||||
|
rsp := oidb.D6D6RspBody{}
|
||||||
|
if err := proto.Unmarshal(payload, &pkg); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := proto.Unmarshal(pkg.Bodybuffer, &rsp); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
ip := rsp.DownloadFileRsp.DownloadIp
|
||||||
|
url := hex.EncodeToString(rsp.DownloadFileRsp.DownloadUrl)
|
||||||
|
return fmt.Sprintf("http://%s/ftn_handler/%s/", ip, url), nil
|
||||||
|
}
|
1771
client/pb/oidb/oidb0x6d8.pb.go
Normal file
1771
client/pb/oidb/oidb0x6d8.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
137
client/pb/oidb/oidb0x6d8.proto
Normal file
137
client/pb/oidb/oidb0x6d8.proto
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
|
option go_package = ".;oidb";
|
||||||
|
|
||||||
|
message D6D8ReqBody {
|
||||||
|
optional GetFileInfoReqBody fileInfoReq = 1;
|
||||||
|
optional GetFileListReqBody fileListInfoReq = 2;
|
||||||
|
optional GetFileCountReqBody groupFileCountReq = 3;
|
||||||
|
optional GetSpaceReqBody groupSpaceReq = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message D6D8RspBody {
|
||||||
|
optional GetFileInfoRspBody fileInfoRsp = 1;
|
||||||
|
optional GetFileListRspBody fileListInfoRsp = 2;
|
||||||
|
optional GetFileCountRspBody fileCountRsp = 3;
|
||||||
|
optional GetSpaceRspBody groupSpaceRsp = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetFileInfoReqBody {
|
||||||
|
optional uint64 groupCode = 1;
|
||||||
|
optional uint32 appId = 2;
|
||||||
|
optional uint32 busId = 3;
|
||||||
|
optional string fileId = 4;
|
||||||
|
optional uint32 fieldFlag = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetFileInfoRspBody {
|
||||||
|
optional int32 retCode = 1;
|
||||||
|
optional string retMsg = 2;
|
||||||
|
optional string clientWording = 3;
|
||||||
|
optional GroupFileInfo fileInfo = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetFileListRspBody {
|
||||||
|
optional int32 retCode = 1;
|
||||||
|
optional string retMsg = 2;
|
||||||
|
optional string clientWording = 3;
|
||||||
|
optional bool isEnd = 4;
|
||||||
|
message Item {
|
||||||
|
optional uint32 type = 1;
|
||||||
|
optional GroupFolderInfo folderInfo = 2;
|
||||||
|
optional GroupFileInfo fileInfo = 3;
|
||||||
|
}
|
||||||
|
repeated Item itemList = 5;
|
||||||
|
optional FileTimeStamp maxTimestamp = 6;
|
||||||
|
optional uint32 allFileCount = 7;
|
||||||
|
optional uint32 filterCode = 8;
|
||||||
|
optional bool safeCheckFlag = 11;
|
||||||
|
optional uint32 safeCheckRes = 12;
|
||||||
|
optional uint32 nextIndex = 13;
|
||||||
|
optional bytes context = 14;
|
||||||
|
optional uint32 role = 15;
|
||||||
|
optional uint32 openFlag = 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupFileInfo {/* renamed from FileInfo */
|
||||||
|
optional string fileId = 1;
|
||||||
|
optional string fileName = 2;
|
||||||
|
optional uint64 fileSize = 3;
|
||||||
|
optional uint32 busId = 4;
|
||||||
|
optional uint64 uploadedSize = 5;
|
||||||
|
optional uint32 uploadTime = 6;
|
||||||
|
optional uint32 deadTime = 7;
|
||||||
|
optional uint32 modifyTime = 8;
|
||||||
|
optional uint32 downloadTimes = 9;
|
||||||
|
optional bytes sha = 10;
|
||||||
|
optional bytes sha3 = 11;
|
||||||
|
optional bytes md5 = 12;
|
||||||
|
optional string localPath = 13;
|
||||||
|
optional string uploaderName = 14;
|
||||||
|
optional uint64 uploaderUin = 15;
|
||||||
|
optional string parentFolderId = 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupFolderInfo {/* renamed from FolderInfo */
|
||||||
|
optional string folderId = 1;
|
||||||
|
optional string parentFolderId = 2;
|
||||||
|
optional string folderName = 3;
|
||||||
|
optional uint32 createTime = 4;
|
||||||
|
optional uint32 modifyTime = 5;
|
||||||
|
optional uint64 createUin = 6;
|
||||||
|
optional string creatorName = 7;
|
||||||
|
optional uint32 totalFileCount = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetFileListReqBody {
|
||||||
|
optional uint64 groupCode = 1;
|
||||||
|
optional uint32 appId = 2;
|
||||||
|
optional string folderId = 3;
|
||||||
|
optional FileTimeStamp startTimestamp = 4;
|
||||||
|
optional uint32 fileCount = 5;
|
||||||
|
optional FileTimeStamp maxTimestamp = 6;
|
||||||
|
optional uint32 allFileCount = 7;
|
||||||
|
optional uint32 reqFrom = 8;
|
||||||
|
optional uint32 sortBy = 9;
|
||||||
|
optional uint32 filterCode = 10;
|
||||||
|
optional uint64 uin = 11;
|
||||||
|
optional uint32 fieldFlag = 12;
|
||||||
|
optional uint32 startIndex = 13;
|
||||||
|
optional bytes context = 14;
|
||||||
|
optional uint32 clientVersion = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetFileCountReqBody {
|
||||||
|
optional uint64 groupCode = 1;
|
||||||
|
optional uint32 appId = 2;
|
||||||
|
optional uint32 busId = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetSpaceReqBody {
|
||||||
|
optional uint64 groupCode = 1;
|
||||||
|
optional uint32 appId = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetFileCountRspBody {
|
||||||
|
optional int32 retCode = 1;
|
||||||
|
optional string retMsg = 2;
|
||||||
|
optional string clientWording = 3;
|
||||||
|
optional uint32 allFileCount = 4;
|
||||||
|
optional bool fileTooMany = 5;
|
||||||
|
optional uint32 limitCount = 6;
|
||||||
|
optional bool isFull = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetSpaceRspBody {
|
||||||
|
optional int32 retCode = 1;
|
||||||
|
optional string retMsg = 2;
|
||||||
|
optional string clientWording = 3;
|
||||||
|
optional uint64 totalSpace = 4;
|
||||||
|
optional uint64 usedSpace = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FileTimeStamp {
|
||||||
|
optional uint32 uploadTime = 1;
|
||||||
|
optional string fileId = 2;
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.25.0
|
// protoc-gen-go v1.25.0
|
||||||
// protoc v3.11.4
|
// protoc v3.11.4
|
||||||
// source: oidb0xd79.proto
|
// source: oidb0xD79.proto
|
||||||
|
|
||||||
package oidb
|
package oidb
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ type D79ReqBody struct {
|
|||||||
func (x *D79ReqBody) Reset() {
|
func (x *D79ReqBody) Reset() {
|
||||||
*x = D79ReqBody{}
|
*x = D79ReqBody{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_oidb0xd79_proto_msgTypes[0]
|
mi := &file_oidb0xD79_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ func (x *D79ReqBody) String() string {
|
|||||||
func (*D79ReqBody) ProtoMessage() {}
|
func (*D79ReqBody) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *D79ReqBody) ProtoReflect() protoreflect.Message {
|
func (x *D79ReqBody) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_oidb0xd79_proto_msgTypes[0]
|
mi := &file_oidb0xD79_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -68,7 +68,7 @@ func (x *D79ReqBody) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use D79ReqBody.ProtoReflect.Descriptor instead.
|
// Deprecated: Use D79ReqBody.ProtoReflect.Descriptor instead.
|
||||||
func (*D79ReqBody) Descriptor() ([]byte, []int) {
|
func (*D79ReqBody) Descriptor() ([]byte, []int) {
|
||||||
return file_oidb0xd79_proto_rawDescGZIP(), []int{0}
|
return file_oidb0xD79_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *D79ReqBody) GetSeq() uint64 {
|
func (x *D79ReqBody) GetSeq() uint64 {
|
||||||
@ -135,7 +135,7 @@ type D79RspBody struct {
|
|||||||
func (x *D79RspBody) Reset() {
|
func (x *D79RspBody) Reset() {
|
||||||
*x = D79RspBody{}
|
*x = D79RspBody{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_oidb0xd79_proto_msgTypes[1]
|
mi := &file_oidb0xD79_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -148,7 +148,7 @@ func (x *D79RspBody) String() string {
|
|||||||
func (*D79RspBody) ProtoMessage() {}
|
func (*D79RspBody) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *D79RspBody) ProtoReflect() protoreflect.Message {
|
func (x *D79RspBody) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_oidb0xd79_proto_msgTypes[1]
|
mi := &file_oidb0xD79_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -161,7 +161,7 @@ func (x *D79RspBody) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use D79RspBody.ProtoReflect.Descriptor instead.
|
// Deprecated: Use D79RspBody.ProtoReflect.Descriptor instead.
|
||||||
func (*D79RspBody) Descriptor() ([]byte, []int) {
|
func (*D79RspBody) Descriptor() ([]byte, []int) {
|
||||||
return file_oidb0xd79_proto_rawDescGZIP(), []int{1}
|
return file_oidb0xD79_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *D79RspBody) GetRet() uint32 {
|
func (x *D79RspBody) GetRet() uint32 {
|
||||||
@ -210,7 +210,7 @@ type D79Content struct {
|
|||||||
func (x *D79Content) Reset() {
|
func (x *D79Content) Reset() {
|
||||||
*x = D79Content{}
|
*x = D79Content{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_oidb0xd79_proto_msgTypes[2]
|
mi := &file_oidb0xD79_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ func (x *D79Content) String() string {
|
|||||||
func (*D79Content) ProtoMessage() {}
|
func (*D79Content) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *D79Content) ProtoReflect() protoreflect.Message {
|
func (x *D79Content) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_oidb0xd79_proto_msgTypes[2]
|
mi := &file_oidb0xD79_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -236,7 +236,7 @@ func (x *D79Content) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use D79Content.ProtoReflect.Descriptor instead.
|
// Deprecated: Use D79Content.ProtoReflect.Descriptor instead.
|
||||||
func (*D79Content) Descriptor() ([]byte, []int) {
|
func (*D79Content) Descriptor() ([]byte, []int) {
|
||||||
return file_oidb0xd79_proto_rawDescGZIP(), []int{2}
|
return file_oidb0xD79_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *D79Content) GetSliceContent() [][]byte {
|
func (x *D79Content) GetSliceContent() [][]byte {
|
||||||
@ -246,10 +246,10 @@ func (x *D79Content) GetSliceContent() [][]byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_oidb0xd79_proto protoreflect.FileDescriptor
|
var File_oidb0xD79_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_oidb0xd79_proto_rawDesc = []byte{
|
var file_oidb0xD79_proto_rawDesc = []byte{
|
||||||
0x0a, 0x0f, 0x6f, 0x69, 0x64, 0x62, 0x30, 0x78, 0x64, 0x37, 0x39, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x0a, 0x0f, 0x6f, 0x69, 0x64, 0x62, 0x30, 0x78, 0x44, 0x37, 0x39, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x22, 0xbb, 0x01, 0x0a, 0x0a, 0x44, 0x37, 0x39, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79,
|
0x6f, 0x22, 0xbb, 0x01, 0x0a, 0x0a, 0x44, 0x37, 0x39, 0x52, 0x65, 0x71, 0x42, 0x6f, 0x64, 0x79,
|
||||||
0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73,
|
0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x73,
|
||||||
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
|
0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||||
@ -279,24 +279,24 @@ var file_oidb0xd79_proto_rawDesc = []byte{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_oidb0xd79_proto_rawDescOnce sync.Once
|
file_oidb0xD79_proto_rawDescOnce sync.Once
|
||||||
file_oidb0xd79_proto_rawDescData = file_oidb0xd79_proto_rawDesc
|
file_oidb0xD79_proto_rawDescData = file_oidb0xD79_proto_rawDesc
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_oidb0xd79_proto_rawDescGZIP() []byte {
|
func file_oidb0xD79_proto_rawDescGZIP() []byte {
|
||||||
file_oidb0xd79_proto_rawDescOnce.Do(func() {
|
file_oidb0xD79_proto_rawDescOnce.Do(func() {
|
||||||
file_oidb0xd79_proto_rawDescData = protoimpl.X.CompressGZIP(file_oidb0xd79_proto_rawDescData)
|
file_oidb0xD79_proto_rawDescData = protoimpl.X.CompressGZIP(file_oidb0xD79_proto_rawDescData)
|
||||||
})
|
})
|
||||||
return file_oidb0xd79_proto_rawDescData
|
return file_oidb0xD79_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_oidb0xd79_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
var file_oidb0xD79_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||||
var file_oidb0xd79_proto_goTypes = []interface{}{
|
var file_oidb0xD79_proto_goTypes = []interface{}{
|
||||||
(*D79ReqBody)(nil), // 0: D79ReqBody
|
(*D79ReqBody)(nil), // 0: D79ReqBody
|
||||||
(*D79RspBody)(nil), // 1: D79RspBody
|
(*D79RspBody)(nil), // 1: D79RspBody
|
||||||
(*D79Content)(nil), // 2: D79Content
|
(*D79Content)(nil), // 2: D79Content
|
||||||
}
|
}
|
||||||
var file_oidb0xd79_proto_depIdxs = []int32{
|
var file_oidb0xD79_proto_depIdxs = []int32{
|
||||||
2, // 0: D79RspBody.content:type_name -> D79Content
|
2, // 0: D79RspBody.content:type_name -> D79Content
|
||||||
1, // [1:1] is the sub-list for method output_type
|
1, // [1:1] is the sub-list for method output_type
|
||||||
1, // [1:1] is the sub-list for method input_type
|
1, // [1:1] is the sub-list for method input_type
|
||||||
@ -305,13 +305,13 @@ var file_oidb0xd79_proto_depIdxs = []int32{
|
|||||||
0, // [0:1] is the sub-list for field type_name
|
0, // [0:1] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_oidb0xd79_proto_init() }
|
func init() { file_oidb0xD79_proto_init() }
|
||||||
func file_oidb0xd79_proto_init() {
|
func file_oidb0xD79_proto_init() {
|
||||||
if File_oidb0xd79_proto != nil {
|
if File_oidb0xD79_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_oidb0xd79_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_oidb0xD79_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*D79ReqBody); i {
|
switch v := v.(*D79ReqBody); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -323,7 +323,7 @@ func file_oidb0xd79_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_oidb0xd79_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
file_oidb0xD79_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*D79RspBody); i {
|
switch v := v.(*D79RspBody); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -335,7 +335,7 @@ func file_oidb0xd79_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_oidb0xd79_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_oidb0xD79_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*D79Content); i {
|
switch v := v.(*D79Content); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -352,18 +352,18 @@ func file_oidb0xd79_proto_init() {
|
|||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_oidb0xd79_proto_rawDesc,
|
RawDescriptor: file_oidb0xD79_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 3,
|
NumMessages: 3,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_oidb0xd79_proto_goTypes,
|
GoTypes: file_oidb0xD79_proto_goTypes,
|
||||||
DependencyIndexes: file_oidb0xd79_proto_depIdxs,
|
DependencyIndexes: file_oidb0xD79_proto_depIdxs,
|
||||||
MessageInfos: file_oidb0xd79_proto_msgTypes,
|
MessageInfos: file_oidb0xD79_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_oidb0xd79_proto = out.File
|
File_oidb0xD79_proto = out.File
|
||||||
file_oidb0xd79_proto_rawDesc = nil
|
file_oidb0xD79_proto_rawDesc = nil
|
||||||
file_oidb0xd79_proto_goTypes = nil
|
file_oidb0xD79_proto_goTypes = nil
|
||||||
file_oidb0xd79_proto_depIdxs = nil
|
file_oidb0xD79_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module github.com/Mrs4s/MiraiGo
|
|||||||
go 1.14
|
go 1.14
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/golang/protobuf v1.4.2
|
github.com/golang/protobuf v1.4.3
|
||||||
github.com/tidwall/gjson v1.6.1
|
github.com/tidwall/gjson v1.6.1
|
||||||
google.golang.org/protobuf v1.25.0
|
google.golang.org/protobuf v1.25.0
|
||||||
)
|
)
|
||||||
|
2
go.sum
2
go.sum
@ -17,6 +17,8 @@ github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0
|
|||||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||||
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
|
||||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
|
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
|
||||||
|
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||||
|
Loading…
x
Reference in New Issue
Block a user