1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

fix: fix GroupFileSystem.GetDownloadUrl error

This commit is contained in:
Mrs4s 2021-12-13 16:51:29 +08:00
parent 5d7cb85b1e
commit f66f2b7d78
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7
3 changed files with 330 additions and 330 deletions

View File

@ -181,8 +181,8 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
return errors.Wrap(err, "query upload failed") return errors.Wrap(err, "query upload failed")
} }
rsp := i.(*oidb.UploadFileRspBody) rsp := i.(*oidb.UploadFileRspBody)
if rsp.BoolFileExist { if rsp.GetBoolFileExist() {
_, pkt := fs.client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.FileId, rsp.BusId, rand.Int31()) _, pkt := fs.client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.GetFileId(), rsp.GetBusId(), rand.Int31())
return fs.client.sendPacket(pkt) return fs.client.sendPacket(pkt)
} }
if len(rsp.UploadIpLanV4) == 0 { if len(rsp.UploadIpLanV4) == 0 {
@ -193,7 +193,7 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
Unknown2: proto.Int32(1), Unknown2: proto.Int32(1),
Entry: &exciting.GroupFileUploadEntry{ Entry: &exciting.GroupFileUploadEntry{
BusiBuff: &exciting.ExcitingBusiInfo{ BusiBuff: &exciting.ExcitingBusiInfo{
BusId: &rsp.BusId, BusId: rsp.BusId,
SenderUin: &fs.client.Uin, SenderUin: &fs.client.Uin,
ReceiverUin: &fs.GroupCode, ReceiverUin: &fs.GroupCode,
GroupCode: &fs.GroupCode, GroupCode: &fs.GroupCode,
@ -202,7 +202,7 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
FileSize: &size, FileSize: &size,
Md5: md5Hash, Md5: md5Hash,
Sha1: sha1Hash, Sha1: sha1Hash,
FileId: []byte(rsp.FileId), FileId: []byte(rsp.GetFileId()),
UploadKey: rsp.CheckKey, UploadKey: rsp.CheckKey,
}, },
ClientInfo: &exciting.ExcitingClientInfo{ ClientInfo: &exciting.ExcitingClientInfo{
@ -219,7 +219,7 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
Unknown: proto.Int32(1), Unknown: proto.Int32(1),
Host: &rsp.UploadIpLanV4[0], Host: &rsp.UploadIpLanV4[0],
}, },
Port: &rsp.UploadPort, Port: rsp.UploadPort,
}, },
}}, }},
}, },
@ -228,7 +228,7 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
if _, err = fs.client.excitingUploadStream(file, 71, fs.client.bigDataSession.SigSession, ext); err != nil { if _, err = fs.client.excitingUploadStream(file, 71, fs.client.bigDataSession.SigSession, ext); err != nil {
return errors.Wrap(err, "upload failed") return errors.Wrap(err, "upload failed")
} }
_, pkt := fs.client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.FileId, rsp.BusId, rand.Int31()) _, pkt := fs.client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.GetFileId(), rsp.GetBusId(), rand.Int31())
return fs.client.sendPacket(pkt) return fs.client.sendPacket(pkt)
} }
@ -270,17 +270,17 @@ func (fs *GroupFileSystem) DeleteFile(parentFolderID, fileId string, busId int32
func (c *QQClient) buildGroupFileUploadReqPacket(parentFolderID, fileName string, groupCode, fileSize int64, md5, sha1 []byte) (uint16, []byte) { func (c *QQClient) buildGroupFileUploadReqPacket(parentFolderID, fileName string, groupCode, fileSize int64, md5, sha1 []byte) (uint16, []byte) {
seq := c.nextSeq() seq := c.nextSeq()
b, _ := proto.Marshal(&oidb.D6D6ReqBody{UploadFileReq: &oidb.UploadFileReqBody{ b, _ := proto.Marshal(&oidb.D6D6ReqBody{UploadFileReq: &oidb.UploadFileReqBody{
GroupCode: groupCode, GroupCode: &groupCode,
AppId: 3, AppId: proto.Int32(3),
BusId: 102, BusId: proto.Int32(102),
Entrance: 5, Entrance: proto.Int32(5),
ParentFolderId: parentFolderID, ParentFolderId: &parentFolderID,
FileName: fileName, FileName: &fileName,
LocalPath: "/storage/emulated/0/Pictures/files/s/" + fileName, LocalPath: proto.String("/storage/emulated/0/Pictures/files/s/" + fileName),
Int64FileSize: fileSize, Int64FileSize: &fileSize,
Sha: sha1, Sha: sha1,
Md5: md5, Md5: md5,
SupportMultiUpload: true, SupportMultiUpload: proto.Bool(true),
}}) }})
req := &oidb.OIDBSSOPkg{ req := &oidb.OIDBSSOPkg{
Command: 1750, Command: 1750,
@ -414,10 +414,10 @@ func (c *QQClient) buildGroupFileDownloadReqPacket(groupCode int64, fileId strin
seq := c.nextSeq() seq := c.nextSeq()
body := &oidb.D6D6ReqBody{ body := &oidb.D6D6ReqBody{
DownloadFileReq: &oidb.DownloadFileReqBody{ DownloadFileReq: &oidb.DownloadFileReqBody{
GroupCode: groupCode, GroupCode: &groupCode,
AppId: 3, AppId: proto.Int32(3),
BusId: busId, BusId: &busId,
FileId: fileId, FileId: &fileId,
}, },
} }
b, _ := proto.Marshal(body) b, _ := proto.Marshal(body)
@ -434,11 +434,11 @@ func (c *QQClient) buildGroupFileDownloadReqPacket(groupCode int64, fileId strin
func (c *QQClient) buildGroupFileDeleteReqPacket(groupCode int64, parentFolderId, fileId string, busId int32) (uint16, []byte) { func (c *QQClient) buildGroupFileDeleteReqPacket(groupCode int64, parentFolderId, fileId string, busId int32) (uint16, []byte) {
seq := c.nextSeq() seq := c.nextSeq()
body := &oidb.D6D6ReqBody{DeleteFileReq: &oidb.DeleteFileReqBody{ body := &oidb.D6D6ReqBody{DeleteFileReq: &oidb.DeleteFileReqBody{
GroupCode: groupCode, GroupCode: &groupCode,
AppId: 3, AppId: proto.Int32(3),
BusId: busId, BusId: &busId,
ParentFolderId: parentFolderId, ParentFolderId: &parentFolderId,
FileId: fileId, FileId: &fileId,
}} }}
b, _ := proto.Marshal(body) b, _ := proto.Marshal(body)
req := &oidb.OIDBSSOPkg{ req := &oidb.OIDBSSOPkg{
@ -475,9 +475,9 @@ func decodeOIDB6d62Response(_ *QQClient, _ *incomingPacketInfo, payload []byte)
return nil, errors.Wrap(err, "failed to unmarshal protobuf message") return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
} }
if rsp.DownloadFileRsp.DownloadUrl == nil { if rsp.DownloadFileRsp.DownloadUrl == nil {
return nil, errors.New(rsp.DownloadFileRsp.ClientWording) return nil, errors.New(rsp.DownloadFileRsp.GetClientWording())
} }
ip := rsp.DownloadFileRsp.DownloadIp ip := rsp.DownloadFileRsp.GetDownloadIp()
url := hex.EncodeToString(rsp.DownloadFileRsp.DownloadUrl) url := hex.EncodeToString(rsp.DownloadFileRsp.DownloadUrl)
return fmt.Sprintf("http://%s/ftn_handler/%s/", ip, url), nil return fmt.Sprintf("http://%s/ftn_handler/%s/", ip, url), nil
} }
@ -494,7 +494,7 @@ func decodeOIDB6d63Response(_ *QQClient, _ *incomingPacketInfo, payload []byte)
if rsp.DeleteFileRsp == nil { if rsp.DeleteFileRsp == nil {
return "", nil return "", nil
} }
return rsp.DeleteFileRsp.ClientWording, nil return rsp.DeleteFileRsp.GetClientWording(), nil
} }
func decodeOIDB6d60Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) { func decodeOIDB6d60Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {

View File

@ -4,173 +4,173 @@
package oidb package oidb
type DeleteFileReqBody struct { type DeleteFileReqBody struct {
GroupCode int64 `protobuf:"varint,1,opt"` GroupCode *int64 `protobuf:"varint,1,opt"`
AppId int32 `protobuf:"varint,2,opt"` AppId *int32 `protobuf:"varint,2,opt"`
BusId int32 `protobuf:"varint,3,opt"` BusId *int32 `protobuf:"varint,3,opt"`
ParentFolderId string `protobuf:"bytes,4,opt"` ParentFolderId *string `protobuf:"bytes,4,opt"`
FileId string `protobuf:"bytes,5,opt"` FileId *string `protobuf:"bytes,5,opt"`
} }
func (x *DeleteFileReqBody) GetGroupCode() int64 { func (x *DeleteFileReqBody) GetGroupCode() int64 {
if x != nil { if x != nil && x.GroupCode != nil {
return x.GroupCode return *x.GroupCode
} }
return 0 return 0
} }
func (x *DeleteFileReqBody) GetAppId() int32 { func (x *DeleteFileReqBody) GetAppId() int32 {
if x != nil { if x != nil && x.AppId != nil {
return x.AppId return *x.AppId
} }
return 0 return 0
} }
func (x *DeleteFileReqBody) GetBusId() int32 { func (x *DeleteFileReqBody) GetBusId() int32 {
if x != nil { if x != nil && x.BusId != nil {
return x.BusId return *x.BusId
} }
return 0 return 0
} }
func (x *DeleteFileReqBody) GetParentFolderId() string { func (x *DeleteFileReqBody) GetParentFolderId() string {
if x != nil { if x != nil && x.ParentFolderId != nil {
return x.ParentFolderId return *x.ParentFolderId
} }
return "" return ""
} }
func (x *DeleteFileReqBody) GetFileId() string { func (x *DeleteFileReqBody) GetFileId() string {
if x != nil { if x != nil && x.FileId != nil {
return x.FileId return *x.FileId
} }
return "" return ""
} }
type DeleteFileRspBody struct { type DeleteFileRspBody struct {
RetCode int32 `protobuf:"varint,1,opt"` RetCode *int32 `protobuf:"varint,1,opt"`
RetMsg string `protobuf:"bytes,2,opt"` RetMsg *string `protobuf:"bytes,2,opt"`
ClientWording string `protobuf:"bytes,3,opt"` ClientWording *string `protobuf:"bytes,3,opt"`
} }
func (x *DeleteFileRspBody) GetRetCode() int32 { func (x *DeleteFileRspBody) GetRetCode() int32 {
if x != nil { if x != nil && x.RetCode != nil {
return x.RetCode return *x.RetCode
} }
return 0 return 0
} }
func (x *DeleteFileRspBody) GetRetMsg() string { func (x *DeleteFileRspBody) GetRetMsg() string {
if x != nil { if x != nil && x.RetMsg != nil {
return x.RetMsg return *x.RetMsg
} }
return "" return ""
} }
func (x *DeleteFileRspBody) GetClientWording() string { func (x *DeleteFileRspBody) GetClientWording() string {
if x != nil { if x != nil && x.ClientWording != nil {
return x.ClientWording return *x.ClientWording
} }
return "" return ""
} }
type DownloadFileReqBody struct { type DownloadFileReqBody struct {
GroupCode int64 `protobuf:"varint,1,opt"` GroupCode *int64 `protobuf:"varint,1,opt"`
AppId int32 `protobuf:"varint,2,opt"` AppId *int32 `protobuf:"varint,2,opt"`
BusId int32 `protobuf:"varint,3,opt"` BusId *int32 `protobuf:"varint,3,opt"`
FileId string `protobuf:"bytes,4,opt"` FileId *string `protobuf:"bytes,4,opt"`
BoolThumbnailReq bool `protobuf:"varint,5,opt"` BoolThumbnailReq *bool `protobuf:"varint,5,opt"`
UrlType int32 `protobuf:"varint,6,opt"` UrlType *int32 `protobuf:"varint,6,opt"`
BoolPreviewReq bool `protobuf:"varint,7,opt"` BoolPreviewReq *bool `protobuf:"varint,7,opt"`
} }
func (x *DownloadFileReqBody) GetGroupCode() int64 { func (x *DownloadFileReqBody) GetGroupCode() int64 {
if x != nil { if x != nil && x.GroupCode != nil {
return x.GroupCode return *x.GroupCode
} }
return 0 return 0
} }
func (x *DownloadFileReqBody) GetAppId() int32 { func (x *DownloadFileReqBody) GetAppId() int32 {
if x != nil { if x != nil && x.AppId != nil {
return x.AppId return *x.AppId
} }
return 0 return 0
} }
func (x *DownloadFileReqBody) GetBusId() int32 { func (x *DownloadFileReqBody) GetBusId() int32 {
if x != nil { if x != nil && x.BusId != nil {
return x.BusId return *x.BusId
} }
return 0 return 0
} }
func (x *DownloadFileReqBody) GetFileId() string { func (x *DownloadFileReqBody) GetFileId() string {
if x != nil { if x != nil && x.FileId != nil {
return x.FileId return *x.FileId
} }
return "" return ""
} }
func (x *DownloadFileReqBody) GetBoolThumbnailReq() bool { func (x *DownloadFileReqBody) GetBoolThumbnailReq() bool {
if x != nil { if x != nil && x.BoolThumbnailReq != nil {
return x.BoolThumbnailReq return *x.BoolThumbnailReq
} }
return false return false
} }
func (x *DownloadFileReqBody) GetUrlType() int32 { func (x *DownloadFileReqBody) GetUrlType() int32 {
if x != nil { if x != nil && x.UrlType != nil {
return x.UrlType return *x.UrlType
} }
return 0 return 0
} }
func (x *DownloadFileReqBody) GetBoolPreviewReq() bool { func (x *DownloadFileReqBody) GetBoolPreviewReq() bool {
if x != nil { if x != nil && x.BoolPreviewReq != nil {
return x.BoolPreviewReq return *x.BoolPreviewReq
} }
return false return false
} }
type DownloadFileRspBody struct { type DownloadFileRspBody struct {
RetCode int32 `protobuf:"varint,1,opt"` RetCode *int32 `protobuf:"varint,1,opt"`
RetMsg string `protobuf:"bytes,2,opt"` RetMsg *string `protobuf:"bytes,2,opt"`
ClientWording string `protobuf:"bytes,3,opt"` ClientWording *string `protobuf:"bytes,3,opt"`
DownloadIp string `protobuf:"bytes,4,opt"` DownloadIp *string `protobuf:"bytes,4,opt"`
DownloadDns []byte `protobuf:"bytes,5,opt"` DownloadDns []byte `protobuf:"bytes,5,opt"`
DownloadUrl []byte `protobuf:"bytes,6,opt"` DownloadUrl []byte `protobuf:"bytes,6,opt"`
Sha []byte `protobuf:"bytes,7,opt"` Sha []byte `protobuf:"bytes,7,opt"`
Sha3 []byte `protobuf:"bytes,8,opt"` Sha3 []byte `protobuf:"bytes,8,opt"`
Md5 []byte `protobuf:"bytes,9,opt"` Md5 []byte `protobuf:"bytes,9,opt"`
CookieVal []byte `protobuf:"bytes,10,opt"` CookieVal []byte `protobuf:"bytes,10,opt"`
SaveFileName string `protobuf:"bytes,11,opt"` SaveFileName *string `protobuf:"bytes,11,opt"`
PreviewPort int32 `protobuf:"varint,12,opt"` PreviewPort *int32 `protobuf:"varint,12,opt"`
} }
func (x *DownloadFileRspBody) GetRetCode() int32 { func (x *DownloadFileRspBody) GetRetCode() int32 {
if x != nil { if x != nil && x.RetCode != nil {
return x.RetCode return *x.RetCode
} }
return 0 return 0
} }
func (x *DownloadFileRspBody) GetRetMsg() string { func (x *DownloadFileRspBody) GetRetMsg() string {
if x != nil { if x != nil && x.RetMsg != nil {
return x.RetMsg return *x.RetMsg
} }
return "" return ""
} }
func (x *DownloadFileRspBody) GetClientWording() string { func (x *DownloadFileRspBody) GetClientWording() string {
if x != nil { if x != nil && x.ClientWording != nil {
return x.ClientWording return *x.ClientWording
} }
return "" return ""
} }
func (x *DownloadFileRspBody) GetDownloadIp() string { func (x *DownloadFileRspBody) GetDownloadIp() string {
if x != nil { if x != nil && x.DownloadIp != nil {
return x.DownloadIp return *x.DownloadIp
} }
return "" return ""
} }
@ -218,179 +218,179 @@ func (x *DownloadFileRspBody) GetCookieVal() []byte {
} }
func (x *DownloadFileRspBody) GetSaveFileName() string { func (x *DownloadFileRspBody) GetSaveFileName() string {
if x != nil { if x != nil && x.SaveFileName != nil {
return x.SaveFileName return *x.SaveFileName
} }
return "" return ""
} }
func (x *DownloadFileRspBody) GetPreviewPort() int32 { func (x *DownloadFileRspBody) GetPreviewPort() int32 {
if x != nil { if x != nil && x.PreviewPort != nil {
return x.PreviewPort return *x.PreviewPort
} }
return 0 return 0
} }
type MoveFileReqBody struct { type MoveFileReqBody struct {
GroupCode int64 `protobuf:"varint,1,opt"` GroupCode *int64 `protobuf:"varint,1,opt"`
AppId int32 `protobuf:"varint,2,opt"` AppId *int32 `protobuf:"varint,2,opt"`
BusId int32 `protobuf:"varint,3,opt"` BusId *int32 `protobuf:"varint,3,opt"`
FileId string `protobuf:"bytes,4,opt"` FileId *string `protobuf:"bytes,4,opt"`
ParentFolderId string `protobuf:"bytes,5,opt"` ParentFolderId *string `protobuf:"bytes,5,opt"`
DestFolderId string `protobuf:"bytes,6,opt"` DestFolderId *string `protobuf:"bytes,6,opt"`
} }
func (x *MoveFileReqBody) GetGroupCode() int64 { func (x *MoveFileReqBody) GetGroupCode() int64 {
if x != nil { if x != nil && x.GroupCode != nil {
return x.GroupCode return *x.GroupCode
} }
return 0 return 0
} }
func (x *MoveFileReqBody) GetAppId() int32 { func (x *MoveFileReqBody) GetAppId() int32 {
if x != nil { if x != nil && x.AppId != nil {
return x.AppId return *x.AppId
} }
return 0 return 0
} }
func (x *MoveFileReqBody) GetBusId() int32 { func (x *MoveFileReqBody) GetBusId() int32 {
if x != nil { if x != nil && x.BusId != nil {
return x.BusId return *x.BusId
} }
return 0 return 0
} }
func (x *MoveFileReqBody) GetFileId() string { func (x *MoveFileReqBody) GetFileId() string {
if x != nil { if x != nil && x.FileId != nil {
return x.FileId return *x.FileId
} }
return "" return ""
} }
func (x *MoveFileReqBody) GetParentFolderId() string { func (x *MoveFileReqBody) GetParentFolderId() string {
if x != nil { if x != nil && x.ParentFolderId != nil {
return x.ParentFolderId return *x.ParentFolderId
} }
return "" return ""
} }
func (x *MoveFileReqBody) GetDestFolderId() string { func (x *MoveFileReqBody) GetDestFolderId() string {
if x != nil { if x != nil && x.DestFolderId != nil {
return x.DestFolderId return *x.DestFolderId
} }
return "" return ""
} }
type MoveFileRspBody struct { type MoveFileRspBody struct {
RetCode int32 `protobuf:"varint,1,opt"` RetCode *int32 `protobuf:"varint,1,opt"`
RetMsg string `protobuf:"bytes,2,opt"` RetMsg *string `protobuf:"bytes,2,opt"`
ClientWording string `protobuf:"bytes,3,opt"` ClientWording *string `protobuf:"bytes,3,opt"`
ParentFolderId string `protobuf:"bytes,4,opt"` ParentFolderId *string `protobuf:"bytes,4,opt"`
} }
func (x *MoveFileRspBody) GetRetCode() int32 { func (x *MoveFileRspBody) GetRetCode() int32 {
if x != nil { if x != nil && x.RetCode != nil {
return x.RetCode return *x.RetCode
} }
return 0 return 0
} }
func (x *MoveFileRspBody) GetRetMsg() string { func (x *MoveFileRspBody) GetRetMsg() string {
if x != nil { if x != nil && x.RetMsg != nil {
return x.RetMsg return *x.RetMsg
} }
return "" return ""
} }
func (x *MoveFileRspBody) GetClientWording() string { func (x *MoveFileRspBody) GetClientWording() string {
if x != nil { if x != nil && x.ClientWording != nil {
return x.ClientWording return *x.ClientWording
} }
return "" return ""
} }
func (x *MoveFileRspBody) GetParentFolderId() string { func (x *MoveFileRspBody) GetParentFolderId() string {
if x != nil { if x != nil && x.ParentFolderId != nil {
return x.ParentFolderId return *x.ParentFolderId
} }
return "" return ""
} }
type RenameFileReqBody struct { type RenameFileReqBody struct {
GroupCode int64 `protobuf:"varint,1,opt"` GroupCode *int64 `protobuf:"varint,1,opt"`
AppId int32 `protobuf:"varint,2,opt"` AppId *int32 `protobuf:"varint,2,opt"`
BusId int32 `protobuf:"varint,3,opt"` BusId *int32 `protobuf:"varint,3,opt"`
FileId string `protobuf:"bytes,4,opt"` FileId *string `protobuf:"bytes,4,opt"`
ParentFolderId string `protobuf:"bytes,5,opt"` ParentFolderId *string `protobuf:"bytes,5,opt"`
NewFileName string `protobuf:"bytes,6,opt"` NewFileName *string `protobuf:"bytes,6,opt"`
} }
func (x *RenameFileReqBody) GetGroupCode() int64 { func (x *RenameFileReqBody) GetGroupCode() int64 {
if x != nil { if x != nil && x.GroupCode != nil {
return x.GroupCode return *x.GroupCode
} }
return 0 return 0
} }
func (x *RenameFileReqBody) GetAppId() int32 { func (x *RenameFileReqBody) GetAppId() int32 {
if x != nil { if x != nil && x.AppId != nil {
return x.AppId return *x.AppId
} }
return 0 return 0
} }
func (x *RenameFileReqBody) GetBusId() int32 { func (x *RenameFileReqBody) GetBusId() int32 {
if x != nil { if x != nil && x.BusId != nil {
return x.BusId return *x.BusId
} }
return 0 return 0
} }
func (x *RenameFileReqBody) GetFileId() string { func (x *RenameFileReqBody) GetFileId() string {
if x != nil { if x != nil && x.FileId != nil {
return x.FileId return *x.FileId
} }
return "" return ""
} }
func (x *RenameFileReqBody) GetParentFolderId() string { func (x *RenameFileReqBody) GetParentFolderId() string {
if x != nil { if x != nil && x.ParentFolderId != nil {
return x.ParentFolderId return *x.ParentFolderId
} }
return "" return ""
} }
func (x *RenameFileReqBody) GetNewFileName() string { func (x *RenameFileReqBody) GetNewFileName() string {
if x != nil { if x != nil && x.NewFileName != nil {
return x.NewFileName return *x.NewFileName
} }
return "" return ""
} }
type RenameFileRspBody struct { type RenameFileRspBody struct {
RetCode int32 `protobuf:"varint,1,opt"` RetCode *int32 `protobuf:"varint,1,opt"`
RetMsg string `protobuf:"bytes,2,opt"` RetMsg *string `protobuf:"bytes,2,opt"`
ClientWording string `protobuf:"bytes,3,opt"` ClientWording *string `protobuf:"bytes,3,opt"`
} }
func (x *RenameFileRspBody) GetRetCode() int32 { func (x *RenameFileRspBody) GetRetCode() int32 {
if x != nil { if x != nil && x.RetCode != nil {
return x.RetCode return *x.RetCode
} }
return 0 return 0
} }
func (x *RenameFileRspBody) GetRetMsg() string { func (x *RenameFileRspBody) GetRetMsg() string {
if x != nil { if x != nil && x.RetMsg != nil {
return x.RetMsg return *x.RetMsg
} }
return "" return ""
} }
func (x *RenameFileRspBody) GetClientWording() string { func (x *RenameFileRspBody) GetClientWording() string {
if x != nil { if x != nil && x.ClientWording != nil {
return x.ClientWording return *x.ClientWording
} }
return "" return ""
} }
@ -447,37 +447,37 @@ func (x *D6D6ReqBody) GetMoveFileReq() *MoveFileReqBody {
} }
type ResendReqBody struct { type ResendReqBody struct {
GroupCode int64 `protobuf:"varint,1,opt"` GroupCode *int64 `protobuf:"varint,1,opt"`
AppId int32 `protobuf:"varint,2,opt"` AppId *int32 `protobuf:"varint,2,opt"`
BusId int32 `protobuf:"varint,3,opt"` BusId *int32 `protobuf:"varint,3,opt"`
FileId string `protobuf:"bytes,4,opt"` FileId *string `protobuf:"bytes,4,opt"`
Sha []byte `protobuf:"bytes,5,opt"` Sha []byte `protobuf:"bytes,5,opt"`
} }
func (x *ResendReqBody) GetGroupCode() int64 { func (x *ResendReqBody) GetGroupCode() int64 {
if x != nil { if x != nil && x.GroupCode != nil {
return x.GroupCode return *x.GroupCode
} }
return 0 return 0
} }
func (x *ResendReqBody) GetAppId() int32 { func (x *ResendReqBody) GetAppId() int32 {
if x != nil { if x != nil && x.AppId != nil {
return x.AppId return *x.AppId
} }
return 0 return 0
} }
func (x *ResendReqBody) GetBusId() int32 { func (x *ResendReqBody) GetBusId() int32 {
if x != nil { if x != nil && x.BusId != nil {
return x.BusId return *x.BusId
} }
return 0 return 0
} }
func (x *ResendReqBody) GetFileId() string { func (x *ResendReqBody) GetFileId() string {
if x != nil { if x != nil && x.FileId != nil {
return x.FileId return *x.FileId
} }
return "" return ""
} }
@ -490,38 +490,38 @@ func (x *ResendReqBody) GetSha() []byte {
} }
type ResendRspBody struct { type ResendRspBody struct {
RetCode int32 `protobuf:"varint,1,opt"` RetCode *int32 `protobuf:"varint,1,opt"`
RetMsg string `protobuf:"bytes,2,opt"` RetMsg *string `protobuf:"bytes,2,opt"`
ClientWording string `protobuf:"bytes,3,opt"` ClientWording *string `protobuf:"bytes,3,opt"`
UploadIp string `protobuf:"bytes,4,opt"` UploadIp *string `protobuf:"bytes,4,opt"`
FileKey []byte `protobuf:"bytes,5,opt"` FileKey []byte `protobuf:"bytes,5,opt"`
CheckKey []byte `protobuf:"bytes,6,opt"` CheckKey []byte `protobuf:"bytes,6,opt"`
} }
func (x *ResendRspBody) GetRetCode() int32 { func (x *ResendRspBody) GetRetCode() int32 {
if x != nil { if x != nil && x.RetCode != nil {
return x.RetCode return *x.RetCode
} }
return 0 return 0
} }
func (x *ResendRspBody) GetRetMsg() string { func (x *ResendRspBody) GetRetMsg() string {
if x != nil { if x != nil && x.RetMsg != nil {
return x.RetMsg return *x.RetMsg
} }
return "" return ""
} }
func (x *ResendRspBody) GetClientWording() string { func (x *ResendRspBody) GetClientWording() string {
if x != nil { if x != nil && x.ClientWording != nil {
return x.ClientWording return *x.ClientWording
} }
return "" return ""
} }
func (x *ResendRspBody) GetUploadIp() string { func (x *ResendRspBody) GetUploadIp() string {
if x != nil { if x != nil && x.UploadIp != nil {
return x.UploadIp return *x.UploadIp
} }
return "" return ""
} }
@ -592,72 +592,72 @@ func (x *D6D6RspBody) GetMoveFileRsp() *MoveFileRspBody {
} }
type UploadFileReqBody struct { type UploadFileReqBody struct {
GroupCode int64 `protobuf:"varint,1,opt"` GroupCode *int64 `protobuf:"varint,1,opt"`
AppId int32 `protobuf:"varint,2,opt"` AppId *int32 `protobuf:"varint,2,opt"`
BusId int32 `protobuf:"varint,3,opt"` BusId *int32 `protobuf:"varint,3,opt"`
Entrance int32 `protobuf:"varint,4,opt"` Entrance *int32 `protobuf:"varint,4,opt"`
ParentFolderId string `protobuf:"bytes,5,opt"` ParentFolderId *string `protobuf:"bytes,5,opt"`
FileName string `protobuf:"bytes,6,opt"` FileName *string `protobuf:"bytes,6,opt"`
LocalPath string `protobuf:"bytes,7,opt"` LocalPath *string `protobuf:"bytes,7,opt"`
Int64FileSize int64 `protobuf:"varint,8,opt"` Int64FileSize *int64 `protobuf:"varint,8,opt"`
Sha []byte `protobuf:"bytes,9,opt"` Sha []byte `protobuf:"bytes,9,opt"`
Sha3 []byte `protobuf:"bytes,10,opt"` Sha3 []byte `protobuf:"bytes,10,opt"`
Md5 []byte `protobuf:"bytes,11,opt"` Md5 []byte `protobuf:"bytes,11,opt"`
SupportMultiUpload bool `protobuf:"varint,15,opt"` SupportMultiUpload *bool `protobuf:"varint,15,opt"`
} }
func (x *UploadFileReqBody) GetGroupCode() int64 { func (x *UploadFileReqBody) GetGroupCode() int64 {
if x != nil { if x != nil && x.GroupCode != nil {
return x.GroupCode return *x.GroupCode
} }
return 0 return 0
} }
func (x *UploadFileReqBody) GetAppId() int32 { func (x *UploadFileReqBody) GetAppId() int32 {
if x != nil { if x != nil && x.AppId != nil {
return x.AppId return *x.AppId
} }
return 0 return 0
} }
func (x *UploadFileReqBody) GetBusId() int32 { func (x *UploadFileReqBody) GetBusId() int32 {
if x != nil { if x != nil && x.BusId != nil {
return x.BusId return *x.BusId
} }
return 0 return 0
} }
func (x *UploadFileReqBody) GetEntrance() int32 { func (x *UploadFileReqBody) GetEntrance() int32 {
if x != nil { if x != nil && x.Entrance != nil {
return x.Entrance return *x.Entrance
} }
return 0 return 0
} }
func (x *UploadFileReqBody) GetParentFolderId() string { func (x *UploadFileReqBody) GetParentFolderId() string {
if x != nil { if x != nil && x.ParentFolderId != nil {
return x.ParentFolderId return *x.ParentFolderId
} }
return "" return ""
} }
func (x *UploadFileReqBody) GetFileName() string { func (x *UploadFileReqBody) GetFileName() string {
if x != nil { if x != nil && x.FileName != nil {
return x.FileName return *x.FileName
} }
return "" return ""
} }
func (x *UploadFileReqBody) GetLocalPath() string { func (x *UploadFileReqBody) GetLocalPath() string {
if x != nil { if x != nil && x.LocalPath != nil {
return x.LocalPath return *x.LocalPath
} }
return "" return ""
} }
func (x *UploadFileReqBody) GetInt64FileSize() int64 { func (x *UploadFileReqBody) GetInt64FileSize() int64 {
if x != nil { if x != nil && x.Int64FileSize != nil {
return x.Int64FileSize return *x.Int64FileSize
} }
return 0 return 0
} }
@ -684,73 +684,73 @@ func (x *UploadFileReqBody) GetMd5() []byte {
} }
func (x *UploadFileReqBody) GetSupportMultiUpload() bool { func (x *UploadFileReqBody) GetSupportMultiUpload() bool {
if x != nil { if x != nil && x.SupportMultiUpload != nil {
return x.SupportMultiUpload return *x.SupportMultiUpload
} }
return false return false
} }
type UploadFileRspBody struct { type UploadFileRspBody struct {
RetCode int32 `protobuf:"varint,1,opt"` RetCode *int32 `protobuf:"varint,1,opt"`
RetMsg string `protobuf:"bytes,2,opt"` RetMsg *string `protobuf:"bytes,2,opt"`
ClientWording string `protobuf:"bytes,3,opt"` ClientWording *string `protobuf:"bytes,3,opt"`
UploadIp string `protobuf:"bytes,4,opt"` UploadIp *string `protobuf:"bytes,4,opt"`
ServerDns string `protobuf:"bytes,5,opt"` ServerDns *string `protobuf:"bytes,5,opt"`
BusId int32 `protobuf:"varint,6,opt"` BusId *int32 `protobuf:"varint,6,opt"`
FileId string `protobuf:"bytes,7,opt"` FileId *string `protobuf:"bytes,7,opt"`
FileKey []byte `protobuf:"bytes,8,opt"` FileKey []byte `protobuf:"bytes,8,opt"`
CheckKey []byte `protobuf:"bytes,9,opt"` CheckKey []byte `protobuf:"bytes,9,opt"`
BoolFileExist bool `protobuf:"varint,10,opt"` BoolFileExist *bool `protobuf:"varint,10,opt"`
UploadIpLanV4 []string `protobuf:"bytes,12,rep"` UploadIpLanV4 []string `protobuf:"bytes,12,rep"`
UploadIpLanV6 []string `protobuf:"bytes,13,rep"` UploadIpLanV6 []string `protobuf:"bytes,13,rep"`
UploadPort int32 `protobuf:"varint,14,opt"` UploadPort *int32 `protobuf:"varint,14,opt"`
} }
func (x *UploadFileRspBody) GetRetCode() int32 { func (x *UploadFileRspBody) GetRetCode() int32 {
if x != nil { if x != nil && x.RetCode != nil {
return x.RetCode return *x.RetCode
} }
return 0 return 0
} }
func (x *UploadFileRspBody) GetRetMsg() string { func (x *UploadFileRspBody) GetRetMsg() string {
if x != nil { if x != nil && x.RetMsg != nil {
return x.RetMsg return *x.RetMsg
} }
return "" return ""
} }
func (x *UploadFileRspBody) GetClientWording() string { func (x *UploadFileRspBody) GetClientWording() string {
if x != nil { if x != nil && x.ClientWording != nil {
return x.ClientWording return *x.ClientWording
} }
return "" return ""
} }
func (x *UploadFileRspBody) GetUploadIp() string { func (x *UploadFileRspBody) GetUploadIp() string {
if x != nil { if x != nil && x.UploadIp != nil {
return x.UploadIp return *x.UploadIp
} }
return "" return ""
} }
func (x *UploadFileRspBody) GetServerDns() string { func (x *UploadFileRspBody) GetServerDns() string {
if x != nil { if x != nil && x.ServerDns != nil {
return x.ServerDns return *x.ServerDns
} }
return "" return ""
} }
func (x *UploadFileRspBody) GetBusId() int32 { func (x *UploadFileRspBody) GetBusId() int32 {
if x != nil { if x != nil && x.BusId != nil {
return x.BusId return *x.BusId
} }
return 0 return 0
} }
func (x *UploadFileRspBody) GetFileId() string { func (x *UploadFileRspBody) GetFileId() string {
if x != nil { if x != nil && x.FileId != nil {
return x.FileId return *x.FileId
} }
return "" return ""
} }
@ -770,8 +770,8 @@ func (x *UploadFileRspBody) GetCheckKey() []byte {
} }
func (x *UploadFileRspBody) GetBoolFileExist() bool { func (x *UploadFileRspBody) GetBoolFileExist() bool {
if x != nil { if x != nil && x.BoolFileExist != nil {
return x.BoolFileExist return *x.BoolFileExist
} }
return false return false
} }
@ -791,8 +791,8 @@ func (x *UploadFileRspBody) GetUploadIpLanV6() []string {
} }
func (x *UploadFileRspBody) GetUploadPort() int32 { func (x *UploadFileRspBody) GetUploadPort() int32 {
if x != nil { if x != nil && x.UploadPort != nil {
return x.UploadPort return *x.UploadPort
} }
return 0 return 0
} }

View File

@ -1,126 +1,126 @@
syntax = "proto3"; syntax = "proto2";
option go_package = "./;oidb"; option go_package = "./;oidb";
message DeleteFileReqBody { message DeleteFileReqBody {
int64 groupCode = 1; optional int64 groupCode = 1;
int32 appId = 2; optional int32 appId = 2;
int32 busId = 3; optional int32 busId = 3;
string parentFolderId = 4; optional string parentFolderId = 4;
string fileId = 5; optional string fileId = 5;
} }
message DeleteFileRspBody { message DeleteFileRspBody {
int32 retCode = 1; optional int32 retCode = 1;
string retMsg = 2; optional string retMsg = 2;
string clientWording = 3; optional string clientWording = 3;
} }
message DownloadFileReqBody { message DownloadFileReqBody {
int64 groupCode = 1; optional int64 groupCode = 1;
int32 appId = 2; optional int32 appId = 2;
int32 busId = 3; optional int32 busId = 3;
string fileId = 4; optional string fileId = 4;
bool boolThumbnailReq = 5; optional bool boolThumbnailReq = 5;
int32 urlType = 6; optional int32 urlType = 6;
bool boolPreviewReq = 7; optional bool boolPreviewReq = 7;
} }
message DownloadFileRspBody { message DownloadFileRspBody {
int32 retCode = 1; optional int32 retCode = 1;
string retMsg = 2; optional string retMsg = 2;
string clientWording = 3; optional string clientWording = 3;
string downloadIp = 4; optional string downloadIp = 4;
bytes downloadDns = 5; optional bytes downloadDns = 5;
bytes downloadUrl = 6; optional bytes downloadUrl = 6;
bytes sha = 7; optional bytes sha = 7;
bytes sha3 = 8; optional bytes sha3 = 8;
bytes md5 = 9; optional bytes md5 = 9;
bytes cookieVal = 10; optional bytes cookieVal = 10;
string saveFileName = 11; optional string saveFileName = 11;
int32 previewPort = 12; optional int32 previewPort = 12;
} }
message MoveFileReqBody { message MoveFileReqBody {
int64 groupCode = 1; optional int64 groupCode = 1;
int32 appId = 2; optional int32 appId = 2;
int32 busId = 3; optional int32 busId = 3;
string fileId = 4; optional string fileId = 4;
string parentFolderId = 5; optional string parentFolderId = 5;
string destFolderId = 6; optional string destFolderId = 6;
} }
message MoveFileRspBody { message MoveFileRspBody {
int32 retCode = 1; optional int32 retCode = 1;
string retMsg = 2; optional string retMsg = 2;
string clientWording = 3; optional string clientWording = 3;
string parentFolderId = 4; optional string parentFolderId = 4;
} }
message RenameFileReqBody { message RenameFileReqBody {
int64 groupCode = 1; optional int64 groupCode = 1;
int32 appId = 2; optional int32 appId = 2;
int32 busId = 3; optional int32 busId = 3;
string fileId = 4; optional string fileId = 4;
string parentFolderId = 5; optional string parentFolderId = 5;
string newFileName = 6; optional string newFileName = 6;
} }
message RenameFileRspBody { message RenameFileRspBody {
int32 retCode = 1; optional int32 retCode = 1;
string retMsg = 2; optional string retMsg = 2;
string clientWording = 3; optional string clientWording = 3;
} }
message D6D6ReqBody { message D6D6ReqBody {
UploadFileReqBody uploadFileReq = 1; optional UploadFileReqBody uploadFileReq = 1;
ResendReqBody resendFileReq = 2; optional ResendReqBody resendFileReq = 2;
DownloadFileReqBody downloadFileReq = 3; optional DownloadFileReqBody downloadFileReq = 3;
DeleteFileReqBody deleteFileReq = 4; optional DeleteFileReqBody deleteFileReq = 4;
RenameFileReqBody renameFileReq = 5; optional RenameFileReqBody renameFileReq = 5;
MoveFileReqBody moveFileReq = 6; optional MoveFileReqBody moveFileReq = 6;
} }
message ResendReqBody { message ResendReqBody {
int64 groupCode = 1; optional int64 groupCode = 1;
int32 appId = 2; optional int32 appId = 2;
int32 busId = 3; optional int32 busId = 3;
string fileId = 4; optional string fileId = 4;
bytes sha = 5; optional bytes sha = 5;
} }
message ResendRspBody { message ResendRspBody {
int32 retCode = 1; optional int32 retCode = 1;
string retMsg = 2; optional string retMsg = 2;
string clientWording = 3; optional string clientWording = 3;
string uploadIp = 4; optional string uploadIp = 4;
bytes fileKey = 5; optional bytes fileKey = 5;
bytes checkKey = 6; optional bytes checkKey = 6;
} }
message D6D6RspBody { message D6D6RspBody {
UploadFileRspBody uploadFileRsp = 1; optional UploadFileRspBody uploadFileRsp = 1;
ResendRspBody resendFileRsp = 2; optional ResendRspBody resendFileRsp = 2;
DownloadFileRspBody downloadFileRsp = 3; optional DownloadFileRspBody downloadFileRsp = 3;
DeleteFileRspBody deleteFileRsp = 4; optional DeleteFileRspBody deleteFileRsp = 4;
RenameFileRspBody renameFileRsp = 5; optional RenameFileRspBody renameFileRsp = 5;
MoveFileRspBody moveFileRsp = 6; optional MoveFileRspBody moveFileRsp = 6;
} }
message UploadFileReqBody { message UploadFileReqBody {
int64 groupCode = 1; optional int64 groupCode = 1;
int32 appId = 2; optional int32 appId = 2;
int32 busId = 3; optional int32 busId = 3;
int32 entrance = 4; optional int32 entrance = 4;
string parentFolderId = 5; optional string parentFolderId = 5;
string fileName = 6; optional string fileName = 6;
string localPath = 7; optional string localPath = 7;
int64 int64FileSize = 8; optional int64 int64FileSize = 8;
bytes sha = 9; optional bytes sha = 9;
bytes sha3 = 10; optional bytes sha3 = 10;
bytes md5 = 11; optional bytes md5 = 11;
bool supportMultiUpload = 15; optional bool supportMultiUpload = 15;
} }
message UploadFileRspBody { message UploadFileRspBody {
int32 retCode = 1; optional int32 retCode = 1;
string retMsg = 2; optional string retMsg = 2;
string clientWording = 3; optional string clientWording = 3;
string uploadIp = 4; optional string uploadIp = 4;
string serverDns = 5; optional string serverDns = 5;
int32 busId = 6; optional int32 busId = 6;
string fileId = 7; optional string fileId = 7;
bytes fileKey = 8; optional bytes fileKey = 8;
bytes checkKey = 9; optional bytes checkKey = 9;
bool boolFileExist = 10; optional bool boolFileExist = 10;
repeated string uploadIpLanV4 = 12; repeated string uploadIpLanV4 = 12;
repeated string uploadIpLanV6 = 13; repeated string uploadIpLanV6 = 13;
int32 uploadPort = 14; optional int32 uploadPort = 14;
} }