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:
parent
5d7cb85b1e
commit
f66f2b7d78
@ -181,8 +181,8 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
|
||||
return errors.Wrap(err, "query upload failed")
|
||||
}
|
||||
rsp := i.(*oidb.UploadFileRspBody)
|
||||
if rsp.BoolFileExist {
|
||||
_, pkt := fs.client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.FileId, rsp.BusId, rand.Int31())
|
||||
if rsp.GetBoolFileExist() {
|
||||
_, pkt := fs.client.buildGroupFileFeedsRequest(fs.GroupCode, rsp.GetFileId(), rsp.GetBusId(), rand.Int31())
|
||||
return fs.client.sendPacket(pkt)
|
||||
}
|
||||
if len(rsp.UploadIpLanV4) == 0 {
|
||||
@ -193,7 +193,7 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
|
||||
Unknown2: proto.Int32(1),
|
||||
Entry: &exciting.GroupFileUploadEntry{
|
||||
BusiBuff: &exciting.ExcitingBusiInfo{
|
||||
BusId: &rsp.BusId,
|
||||
BusId: rsp.BusId,
|
||||
SenderUin: &fs.client.Uin,
|
||||
ReceiverUin: &fs.GroupCode,
|
||||
GroupCode: &fs.GroupCode,
|
||||
@ -202,7 +202,7 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
|
||||
FileSize: &size,
|
||||
Md5: md5Hash,
|
||||
Sha1: sha1Hash,
|
||||
FileId: []byte(rsp.FileId),
|
||||
FileId: []byte(rsp.GetFileId()),
|
||||
UploadKey: rsp.CheckKey,
|
||||
},
|
||||
ClientInfo: &exciting.ExcitingClientInfo{
|
||||
@ -219,7 +219,7 @@ func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error {
|
||||
Unknown: proto.Int32(1),
|
||||
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 {
|
||||
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)
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
seq := c.nextSeq()
|
||||
b, _ := proto.Marshal(&oidb.D6D6ReqBody{UploadFileReq: &oidb.UploadFileReqBody{
|
||||
GroupCode: groupCode,
|
||||
AppId: 3,
|
||||
BusId: 102,
|
||||
Entrance: 5,
|
||||
ParentFolderId: parentFolderID,
|
||||
FileName: fileName,
|
||||
LocalPath: "/storage/emulated/0/Pictures/files/s/" + fileName,
|
||||
Int64FileSize: fileSize,
|
||||
GroupCode: &groupCode,
|
||||
AppId: proto.Int32(3),
|
||||
BusId: proto.Int32(102),
|
||||
Entrance: proto.Int32(5),
|
||||
ParentFolderId: &parentFolderID,
|
||||
FileName: &fileName,
|
||||
LocalPath: proto.String("/storage/emulated/0/Pictures/files/s/" + fileName),
|
||||
Int64FileSize: &fileSize,
|
||||
Sha: sha1,
|
||||
Md5: md5,
|
||||
SupportMultiUpload: true,
|
||||
SupportMultiUpload: proto.Bool(true),
|
||||
}})
|
||||
req := &oidb.OIDBSSOPkg{
|
||||
Command: 1750,
|
||||
@ -414,10 +414,10 @@ func (c *QQClient) buildGroupFileDownloadReqPacket(groupCode int64, fileId strin
|
||||
seq := c.nextSeq()
|
||||
body := &oidb.D6D6ReqBody{
|
||||
DownloadFileReq: &oidb.DownloadFileReqBody{
|
||||
GroupCode: groupCode,
|
||||
AppId: 3,
|
||||
BusId: busId,
|
||||
FileId: fileId,
|
||||
GroupCode: &groupCode,
|
||||
AppId: proto.Int32(3),
|
||||
BusId: &busId,
|
||||
FileId: &fileId,
|
||||
},
|
||||
}
|
||||
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) {
|
||||
seq := c.nextSeq()
|
||||
body := &oidb.D6D6ReqBody{DeleteFileReq: &oidb.DeleteFileReqBody{
|
||||
GroupCode: groupCode,
|
||||
AppId: 3,
|
||||
BusId: busId,
|
||||
ParentFolderId: parentFolderId,
|
||||
FileId: fileId,
|
||||
GroupCode: &groupCode,
|
||||
AppId: proto.Int32(3),
|
||||
BusId: &busId,
|
||||
ParentFolderId: &parentFolderId,
|
||||
FileId: &fileId,
|
||||
}}
|
||||
b, _ := proto.Marshal(body)
|
||||
req := &oidb.OIDBSSOPkg{
|
||||
@ -475,9 +475,9 @@ func decodeOIDB6d62Response(_ *QQClient, _ *incomingPacketInfo, payload []byte)
|
||||
return nil, errors.Wrap(err, "failed to unmarshal protobuf message")
|
||||
}
|
||||
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)
|
||||
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 {
|
||||
return "", nil
|
||||
}
|
||||
return rsp.DeleteFileRsp.ClientWording, nil
|
||||
return rsp.DeleteFileRsp.GetClientWording(), nil
|
||||
}
|
||||
|
||||
func decodeOIDB6d60Response(_ *QQClient, _ *incomingPacketInfo, payload []byte) (interface{}, error) {
|
||||
|
@ -4,173 +4,173 @@
|
||||
package oidb
|
||||
|
||||
type DeleteFileReqBody struct {
|
||||
GroupCode int64 `protobuf:"varint,1,opt"`
|
||||
AppId int32 `protobuf:"varint,2,opt"`
|
||||
BusId int32 `protobuf:"varint,3,opt"`
|
||||
ParentFolderId string `protobuf:"bytes,4,opt"`
|
||||
FileId string `protobuf:"bytes,5,opt"`
|
||||
GroupCode *int64 `protobuf:"varint,1,opt"`
|
||||
AppId *int32 `protobuf:"varint,2,opt"`
|
||||
BusId *int32 `protobuf:"varint,3,opt"`
|
||||
ParentFolderId *string `protobuf:"bytes,4,opt"`
|
||||
FileId *string `protobuf:"bytes,5,opt"`
|
||||
}
|
||||
|
||||
func (x *DeleteFileReqBody) GetGroupCode() int64 {
|
||||
if x != nil {
|
||||
return x.GroupCode
|
||||
if x != nil && x.GroupCode != nil {
|
||||
return *x.GroupCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeleteFileReqBody) GetAppId() int32 {
|
||||
if x != nil {
|
||||
return x.AppId
|
||||
if x != nil && x.AppId != nil {
|
||||
return *x.AppId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeleteFileReqBody) GetBusId() int32 {
|
||||
if x != nil {
|
||||
return x.BusId
|
||||
if x != nil && x.BusId != nil {
|
||||
return *x.BusId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeleteFileReqBody) GetParentFolderId() string {
|
||||
if x != nil {
|
||||
return x.ParentFolderId
|
||||
if x != nil && x.ParentFolderId != nil {
|
||||
return *x.ParentFolderId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeleteFileReqBody) GetFileId() string {
|
||||
if x != nil {
|
||||
return x.FileId
|
||||
if x != nil && x.FileId != nil {
|
||||
return *x.FileId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DeleteFileRspBody struct {
|
||||
RetCode int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg string `protobuf:"bytes,2,opt"`
|
||||
ClientWording string `protobuf:"bytes,3,opt"`
|
||||
RetCode *int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg *string `protobuf:"bytes,2,opt"`
|
||||
ClientWording *string `protobuf:"bytes,3,opt"`
|
||||
}
|
||||
|
||||
func (x *DeleteFileRspBody) GetRetCode() int32 {
|
||||
if x != nil {
|
||||
return x.RetCode
|
||||
if x != nil && x.RetCode != nil {
|
||||
return *x.RetCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DeleteFileRspBody) GetRetMsg() string {
|
||||
if x != nil {
|
||||
return x.RetMsg
|
||||
if x != nil && x.RetMsg != nil {
|
||||
return *x.RetMsg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DeleteFileRspBody) GetClientWording() string {
|
||||
if x != nil {
|
||||
return x.ClientWording
|
||||
if x != nil && x.ClientWording != nil {
|
||||
return *x.ClientWording
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type DownloadFileReqBody struct {
|
||||
GroupCode int64 `protobuf:"varint,1,opt"`
|
||||
AppId int32 `protobuf:"varint,2,opt"`
|
||||
BusId int32 `protobuf:"varint,3,opt"`
|
||||
FileId string `protobuf:"bytes,4,opt"`
|
||||
BoolThumbnailReq bool `protobuf:"varint,5,opt"`
|
||||
UrlType int32 `protobuf:"varint,6,opt"`
|
||||
BoolPreviewReq bool `protobuf:"varint,7,opt"`
|
||||
GroupCode *int64 `protobuf:"varint,1,opt"`
|
||||
AppId *int32 `protobuf:"varint,2,opt"`
|
||||
BusId *int32 `protobuf:"varint,3,opt"`
|
||||
FileId *string `protobuf:"bytes,4,opt"`
|
||||
BoolThumbnailReq *bool `protobuf:"varint,5,opt"`
|
||||
UrlType *int32 `protobuf:"varint,6,opt"`
|
||||
BoolPreviewReq *bool `protobuf:"varint,7,opt"`
|
||||
}
|
||||
|
||||
func (x *DownloadFileReqBody) GetGroupCode() int64 {
|
||||
if x != nil {
|
||||
return x.GroupCode
|
||||
if x != nil && x.GroupCode != nil {
|
||||
return *x.GroupCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DownloadFileReqBody) GetAppId() int32 {
|
||||
if x != nil {
|
||||
return x.AppId
|
||||
if x != nil && x.AppId != nil {
|
||||
return *x.AppId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DownloadFileReqBody) GetBusId() int32 {
|
||||
if x != nil {
|
||||
return x.BusId
|
||||
if x != nil && x.BusId != nil {
|
||||
return *x.BusId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DownloadFileReqBody) GetFileId() string {
|
||||
if x != nil {
|
||||
return x.FileId
|
||||
if x != nil && x.FileId != nil {
|
||||
return *x.FileId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DownloadFileReqBody) GetBoolThumbnailReq() bool {
|
||||
if x != nil {
|
||||
return x.BoolThumbnailReq
|
||||
if x != nil && x.BoolThumbnailReq != nil {
|
||||
return *x.BoolThumbnailReq
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *DownloadFileReqBody) GetUrlType() int32 {
|
||||
if x != nil {
|
||||
return x.UrlType
|
||||
if x != nil && x.UrlType != nil {
|
||||
return *x.UrlType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DownloadFileReqBody) GetBoolPreviewReq() bool {
|
||||
if x != nil {
|
||||
return x.BoolPreviewReq
|
||||
if x != nil && x.BoolPreviewReq != nil {
|
||||
return *x.BoolPreviewReq
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type DownloadFileRspBody struct {
|
||||
RetCode int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg string `protobuf:"bytes,2,opt"`
|
||||
ClientWording string `protobuf:"bytes,3,opt"`
|
||||
DownloadIp string `protobuf:"bytes,4,opt"`
|
||||
RetCode *int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg *string `protobuf:"bytes,2,opt"`
|
||||
ClientWording *string `protobuf:"bytes,3,opt"`
|
||||
DownloadIp *string `protobuf:"bytes,4,opt"`
|
||||
DownloadDns []byte `protobuf:"bytes,5,opt"`
|
||||
DownloadUrl []byte `protobuf:"bytes,6,opt"`
|
||||
Sha []byte `protobuf:"bytes,7,opt"`
|
||||
Sha3 []byte `protobuf:"bytes,8,opt"`
|
||||
Md5 []byte `protobuf:"bytes,9,opt"`
|
||||
CookieVal []byte `protobuf:"bytes,10,opt"`
|
||||
SaveFileName string `protobuf:"bytes,11,opt"`
|
||||
PreviewPort int32 `protobuf:"varint,12,opt"`
|
||||
SaveFileName *string `protobuf:"bytes,11,opt"`
|
||||
PreviewPort *int32 `protobuf:"varint,12,opt"`
|
||||
}
|
||||
|
||||
func (x *DownloadFileRspBody) GetRetCode() int32 {
|
||||
if x != nil {
|
||||
return x.RetCode
|
||||
if x != nil && x.RetCode != nil {
|
||||
return *x.RetCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DownloadFileRspBody) GetRetMsg() string {
|
||||
if x != nil {
|
||||
return x.RetMsg
|
||||
if x != nil && x.RetMsg != nil {
|
||||
return *x.RetMsg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DownloadFileRspBody) GetClientWording() string {
|
||||
if x != nil {
|
||||
return x.ClientWording
|
||||
if x != nil && x.ClientWording != nil {
|
||||
return *x.ClientWording
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DownloadFileRspBody) GetDownloadIp() string {
|
||||
if x != nil {
|
||||
return x.DownloadIp
|
||||
if x != nil && x.DownloadIp != nil {
|
||||
return *x.DownloadIp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@ -218,179 +218,179 @@ func (x *DownloadFileRspBody) GetCookieVal() []byte {
|
||||
}
|
||||
|
||||
func (x *DownloadFileRspBody) GetSaveFileName() string {
|
||||
if x != nil {
|
||||
return x.SaveFileName
|
||||
if x != nil && x.SaveFileName != nil {
|
||||
return *x.SaveFileName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DownloadFileRspBody) GetPreviewPort() int32 {
|
||||
if x != nil {
|
||||
return x.PreviewPort
|
||||
if x != nil && x.PreviewPort != nil {
|
||||
return *x.PreviewPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type MoveFileReqBody struct {
|
||||
GroupCode int64 `protobuf:"varint,1,opt"`
|
||||
AppId int32 `protobuf:"varint,2,opt"`
|
||||
BusId int32 `protobuf:"varint,3,opt"`
|
||||
FileId string `protobuf:"bytes,4,opt"`
|
||||
ParentFolderId string `protobuf:"bytes,5,opt"`
|
||||
DestFolderId string `protobuf:"bytes,6,opt"`
|
||||
GroupCode *int64 `protobuf:"varint,1,opt"`
|
||||
AppId *int32 `protobuf:"varint,2,opt"`
|
||||
BusId *int32 `protobuf:"varint,3,opt"`
|
||||
FileId *string `protobuf:"bytes,4,opt"`
|
||||
ParentFolderId *string `protobuf:"bytes,5,opt"`
|
||||
DestFolderId *string `protobuf:"bytes,6,opt"`
|
||||
}
|
||||
|
||||
func (x *MoveFileReqBody) GetGroupCode() int64 {
|
||||
if x != nil {
|
||||
return x.GroupCode
|
||||
if x != nil && x.GroupCode != nil {
|
||||
return *x.GroupCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MoveFileReqBody) GetAppId() int32 {
|
||||
if x != nil {
|
||||
return x.AppId
|
||||
if x != nil && x.AppId != nil {
|
||||
return *x.AppId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MoveFileReqBody) GetBusId() int32 {
|
||||
if x != nil {
|
||||
return x.BusId
|
||||
if x != nil && x.BusId != nil {
|
||||
return *x.BusId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MoveFileReqBody) GetFileId() string {
|
||||
if x != nil {
|
||||
return x.FileId
|
||||
if x != nil && x.FileId != nil {
|
||||
return *x.FileId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MoveFileReqBody) GetParentFolderId() string {
|
||||
if x != nil {
|
||||
return x.ParentFolderId
|
||||
if x != nil && x.ParentFolderId != nil {
|
||||
return *x.ParentFolderId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MoveFileReqBody) GetDestFolderId() string {
|
||||
if x != nil {
|
||||
return x.DestFolderId
|
||||
if x != nil && x.DestFolderId != nil {
|
||||
return *x.DestFolderId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MoveFileRspBody struct {
|
||||
RetCode int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg string `protobuf:"bytes,2,opt"`
|
||||
ClientWording string `protobuf:"bytes,3,opt"`
|
||||
ParentFolderId string `protobuf:"bytes,4,opt"`
|
||||
RetCode *int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg *string `protobuf:"bytes,2,opt"`
|
||||
ClientWording *string `protobuf:"bytes,3,opt"`
|
||||
ParentFolderId *string `protobuf:"bytes,4,opt"`
|
||||
}
|
||||
|
||||
func (x *MoveFileRspBody) GetRetCode() int32 {
|
||||
if x != nil {
|
||||
return x.RetCode
|
||||
if x != nil && x.RetCode != nil {
|
||||
return *x.RetCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MoveFileRspBody) GetRetMsg() string {
|
||||
if x != nil {
|
||||
return x.RetMsg
|
||||
if x != nil && x.RetMsg != nil {
|
||||
return *x.RetMsg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MoveFileRspBody) GetClientWording() string {
|
||||
if x != nil {
|
||||
return x.ClientWording
|
||||
if x != nil && x.ClientWording != nil {
|
||||
return *x.ClientWording
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MoveFileRspBody) GetParentFolderId() string {
|
||||
if x != nil {
|
||||
return x.ParentFolderId
|
||||
if x != nil && x.ParentFolderId != nil {
|
||||
return *x.ParentFolderId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RenameFileReqBody struct {
|
||||
GroupCode int64 `protobuf:"varint,1,opt"`
|
||||
AppId int32 `protobuf:"varint,2,opt"`
|
||||
BusId int32 `protobuf:"varint,3,opt"`
|
||||
FileId string `protobuf:"bytes,4,opt"`
|
||||
ParentFolderId string `protobuf:"bytes,5,opt"`
|
||||
NewFileName string `protobuf:"bytes,6,opt"`
|
||||
GroupCode *int64 `protobuf:"varint,1,opt"`
|
||||
AppId *int32 `protobuf:"varint,2,opt"`
|
||||
BusId *int32 `protobuf:"varint,3,opt"`
|
||||
FileId *string `protobuf:"bytes,4,opt"`
|
||||
ParentFolderId *string `protobuf:"bytes,5,opt"`
|
||||
NewFileName *string `protobuf:"bytes,6,opt"`
|
||||
}
|
||||
|
||||
func (x *RenameFileReqBody) GetGroupCode() int64 {
|
||||
if x != nil {
|
||||
return x.GroupCode
|
||||
if x != nil && x.GroupCode != nil {
|
||||
return *x.GroupCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RenameFileReqBody) GetAppId() int32 {
|
||||
if x != nil {
|
||||
return x.AppId
|
||||
if x != nil && x.AppId != nil {
|
||||
return *x.AppId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RenameFileReqBody) GetBusId() int32 {
|
||||
if x != nil {
|
||||
return x.BusId
|
||||
if x != nil && x.BusId != nil {
|
||||
return *x.BusId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RenameFileReqBody) GetFileId() string {
|
||||
if x != nil {
|
||||
return x.FileId
|
||||
if x != nil && x.FileId != nil {
|
||||
return *x.FileId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RenameFileReqBody) GetParentFolderId() string {
|
||||
if x != nil {
|
||||
return x.ParentFolderId
|
||||
if x != nil && x.ParentFolderId != nil {
|
||||
return *x.ParentFolderId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RenameFileReqBody) GetNewFileName() string {
|
||||
if x != nil {
|
||||
return x.NewFileName
|
||||
if x != nil && x.NewFileName != nil {
|
||||
return *x.NewFileName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RenameFileRspBody struct {
|
||||
RetCode int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg string `protobuf:"bytes,2,opt"`
|
||||
ClientWording string `protobuf:"bytes,3,opt"`
|
||||
RetCode *int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg *string `protobuf:"bytes,2,opt"`
|
||||
ClientWording *string `protobuf:"bytes,3,opt"`
|
||||
}
|
||||
|
||||
func (x *RenameFileRspBody) GetRetCode() int32 {
|
||||
if x != nil {
|
||||
return x.RetCode
|
||||
if x != nil && x.RetCode != nil {
|
||||
return *x.RetCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RenameFileRspBody) GetRetMsg() string {
|
||||
if x != nil {
|
||||
return x.RetMsg
|
||||
if x != nil && x.RetMsg != nil {
|
||||
return *x.RetMsg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RenameFileRspBody) GetClientWording() string {
|
||||
if x != nil {
|
||||
return x.ClientWording
|
||||
if x != nil && x.ClientWording != nil {
|
||||
return *x.ClientWording
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@ -447,37 +447,37 @@ func (x *D6D6ReqBody) GetMoveFileReq() *MoveFileReqBody {
|
||||
}
|
||||
|
||||
type ResendReqBody struct {
|
||||
GroupCode int64 `protobuf:"varint,1,opt"`
|
||||
AppId int32 `protobuf:"varint,2,opt"`
|
||||
BusId int32 `protobuf:"varint,3,opt"`
|
||||
FileId string `protobuf:"bytes,4,opt"`
|
||||
GroupCode *int64 `protobuf:"varint,1,opt"`
|
||||
AppId *int32 `protobuf:"varint,2,opt"`
|
||||
BusId *int32 `protobuf:"varint,3,opt"`
|
||||
FileId *string `protobuf:"bytes,4,opt"`
|
||||
Sha []byte `protobuf:"bytes,5,opt"`
|
||||
}
|
||||
|
||||
func (x *ResendReqBody) GetGroupCode() int64 {
|
||||
if x != nil {
|
||||
return x.GroupCode
|
||||
if x != nil && x.GroupCode != nil {
|
||||
return *x.GroupCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ResendReqBody) GetAppId() int32 {
|
||||
if x != nil {
|
||||
return x.AppId
|
||||
if x != nil && x.AppId != nil {
|
||||
return *x.AppId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ResendReqBody) GetBusId() int32 {
|
||||
if x != nil {
|
||||
return x.BusId
|
||||
if x != nil && x.BusId != nil {
|
||||
return *x.BusId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ResendReqBody) GetFileId() string {
|
||||
if x != nil {
|
||||
return x.FileId
|
||||
if x != nil && x.FileId != nil {
|
||||
return *x.FileId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@ -490,38 +490,38 @@ func (x *ResendReqBody) GetSha() []byte {
|
||||
}
|
||||
|
||||
type ResendRspBody struct {
|
||||
RetCode int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg string `protobuf:"bytes,2,opt"`
|
||||
ClientWording string `protobuf:"bytes,3,opt"`
|
||||
UploadIp string `protobuf:"bytes,4,opt"`
|
||||
RetCode *int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg *string `protobuf:"bytes,2,opt"`
|
||||
ClientWording *string `protobuf:"bytes,3,opt"`
|
||||
UploadIp *string `protobuf:"bytes,4,opt"`
|
||||
FileKey []byte `protobuf:"bytes,5,opt"`
|
||||
CheckKey []byte `protobuf:"bytes,6,opt"`
|
||||
}
|
||||
|
||||
func (x *ResendRspBody) GetRetCode() int32 {
|
||||
if x != nil {
|
||||
return x.RetCode
|
||||
if x != nil && x.RetCode != nil {
|
||||
return *x.RetCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ResendRspBody) GetRetMsg() string {
|
||||
if x != nil {
|
||||
return x.RetMsg
|
||||
if x != nil && x.RetMsg != nil {
|
||||
return *x.RetMsg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ResendRspBody) GetClientWording() string {
|
||||
if x != nil {
|
||||
return x.ClientWording
|
||||
if x != nil && x.ClientWording != nil {
|
||||
return *x.ClientWording
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ResendRspBody) GetUploadIp() string {
|
||||
if x != nil {
|
||||
return x.UploadIp
|
||||
if x != nil && x.UploadIp != nil {
|
||||
return *x.UploadIp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@ -592,72 +592,72 @@ func (x *D6D6RspBody) GetMoveFileRsp() *MoveFileRspBody {
|
||||
}
|
||||
|
||||
type UploadFileReqBody struct {
|
||||
GroupCode int64 `protobuf:"varint,1,opt"`
|
||||
AppId int32 `protobuf:"varint,2,opt"`
|
||||
BusId int32 `protobuf:"varint,3,opt"`
|
||||
Entrance int32 `protobuf:"varint,4,opt"`
|
||||
ParentFolderId string `protobuf:"bytes,5,opt"`
|
||||
FileName string `protobuf:"bytes,6,opt"`
|
||||
LocalPath string `protobuf:"bytes,7,opt"`
|
||||
Int64FileSize int64 `protobuf:"varint,8,opt"`
|
||||
GroupCode *int64 `protobuf:"varint,1,opt"`
|
||||
AppId *int32 `protobuf:"varint,2,opt"`
|
||||
BusId *int32 `protobuf:"varint,3,opt"`
|
||||
Entrance *int32 `protobuf:"varint,4,opt"`
|
||||
ParentFolderId *string `protobuf:"bytes,5,opt"`
|
||||
FileName *string `protobuf:"bytes,6,opt"`
|
||||
LocalPath *string `protobuf:"bytes,7,opt"`
|
||||
Int64FileSize *int64 `protobuf:"varint,8,opt"`
|
||||
Sha []byte `protobuf:"bytes,9,opt"`
|
||||
Sha3 []byte `protobuf:"bytes,10,opt"`
|
||||
Md5 []byte `protobuf:"bytes,11,opt"`
|
||||
SupportMultiUpload bool `protobuf:"varint,15,opt"`
|
||||
SupportMultiUpload *bool `protobuf:"varint,15,opt"`
|
||||
}
|
||||
|
||||
func (x *UploadFileReqBody) GetGroupCode() int64 {
|
||||
if x != nil {
|
||||
return x.GroupCode
|
||||
if x != nil && x.GroupCode != nil {
|
||||
return *x.GroupCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UploadFileReqBody) GetAppId() int32 {
|
||||
if x != nil {
|
||||
return x.AppId
|
||||
if x != nil && x.AppId != nil {
|
||||
return *x.AppId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UploadFileReqBody) GetBusId() int32 {
|
||||
if x != nil {
|
||||
return x.BusId
|
||||
if x != nil && x.BusId != nil {
|
||||
return *x.BusId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UploadFileReqBody) GetEntrance() int32 {
|
||||
if x != nil {
|
||||
return x.Entrance
|
||||
if x != nil && x.Entrance != nil {
|
||||
return *x.Entrance
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UploadFileReqBody) GetParentFolderId() string {
|
||||
if x != nil {
|
||||
return x.ParentFolderId
|
||||
if x != nil && x.ParentFolderId != nil {
|
||||
return *x.ParentFolderId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UploadFileReqBody) GetFileName() string {
|
||||
if x != nil {
|
||||
return x.FileName
|
||||
if x != nil && x.FileName != nil {
|
||||
return *x.FileName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UploadFileReqBody) GetLocalPath() string {
|
||||
if x != nil {
|
||||
return x.LocalPath
|
||||
if x != nil && x.LocalPath != nil {
|
||||
return *x.LocalPath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UploadFileReqBody) GetInt64FileSize() int64 {
|
||||
if x != nil {
|
||||
return x.Int64FileSize
|
||||
if x != nil && x.Int64FileSize != nil {
|
||||
return *x.Int64FileSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -684,73 +684,73 @@ func (x *UploadFileReqBody) GetMd5() []byte {
|
||||
}
|
||||
|
||||
func (x *UploadFileReqBody) GetSupportMultiUpload() bool {
|
||||
if x != nil {
|
||||
return x.SupportMultiUpload
|
||||
if x != nil && x.SupportMultiUpload != nil {
|
||||
return *x.SupportMultiUpload
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type UploadFileRspBody struct {
|
||||
RetCode int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg string `protobuf:"bytes,2,opt"`
|
||||
ClientWording string `protobuf:"bytes,3,opt"`
|
||||
UploadIp string `protobuf:"bytes,4,opt"`
|
||||
ServerDns string `protobuf:"bytes,5,opt"`
|
||||
BusId int32 `protobuf:"varint,6,opt"`
|
||||
FileId string `protobuf:"bytes,7,opt"`
|
||||
RetCode *int32 `protobuf:"varint,1,opt"`
|
||||
RetMsg *string `protobuf:"bytes,2,opt"`
|
||||
ClientWording *string `protobuf:"bytes,3,opt"`
|
||||
UploadIp *string `protobuf:"bytes,4,opt"`
|
||||
ServerDns *string `protobuf:"bytes,5,opt"`
|
||||
BusId *int32 `protobuf:"varint,6,opt"`
|
||||
FileId *string `protobuf:"bytes,7,opt"`
|
||||
FileKey []byte `protobuf:"bytes,8,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"`
|
||||
UploadIpLanV6 []string `protobuf:"bytes,13,rep"`
|
||||
UploadPort int32 `protobuf:"varint,14,opt"`
|
||||
UploadPort *int32 `protobuf:"varint,14,opt"`
|
||||
}
|
||||
|
||||
func (x *UploadFileRspBody) GetRetCode() int32 {
|
||||
if x != nil {
|
||||
return x.RetCode
|
||||
if x != nil && x.RetCode != nil {
|
||||
return *x.RetCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UploadFileRspBody) GetRetMsg() string {
|
||||
if x != nil {
|
||||
return x.RetMsg
|
||||
if x != nil && x.RetMsg != nil {
|
||||
return *x.RetMsg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UploadFileRspBody) GetClientWording() string {
|
||||
if x != nil {
|
||||
return x.ClientWording
|
||||
if x != nil && x.ClientWording != nil {
|
||||
return *x.ClientWording
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UploadFileRspBody) GetUploadIp() string {
|
||||
if x != nil {
|
||||
return x.UploadIp
|
||||
if x != nil && x.UploadIp != nil {
|
||||
return *x.UploadIp
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UploadFileRspBody) GetServerDns() string {
|
||||
if x != nil {
|
||||
return x.ServerDns
|
||||
if x != nil && x.ServerDns != nil {
|
||||
return *x.ServerDns
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *UploadFileRspBody) GetBusId() int32 {
|
||||
if x != nil {
|
||||
return x.BusId
|
||||
if x != nil && x.BusId != nil {
|
||||
return *x.BusId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *UploadFileRspBody) GetFileId() string {
|
||||
if x != nil {
|
||||
return x.FileId
|
||||
if x != nil && x.FileId != nil {
|
||||
return *x.FileId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@ -770,8 +770,8 @@ func (x *UploadFileRspBody) GetCheckKey() []byte {
|
||||
}
|
||||
|
||||
func (x *UploadFileRspBody) GetBoolFileExist() bool {
|
||||
if x != nil {
|
||||
return x.BoolFileExist
|
||||
if x != nil && x.BoolFileExist != nil {
|
||||
return *x.BoolFileExist
|
||||
}
|
||||
return false
|
||||
}
|
||||
@ -791,8 +791,8 @@ func (x *UploadFileRspBody) GetUploadIpLanV6() []string {
|
||||
}
|
||||
|
||||
func (x *UploadFileRspBody) GetUploadPort() int32 {
|
||||
if x != nil {
|
||||
return x.UploadPort
|
||||
if x != nil && x.UploadPort != nil {
|
||||
return *x.UploadPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
@ -1,126 +1,126 @@
|
||||
syntax = "proto3";
|
||||
syntax = "proto2";
|
||||
|
||||
option go_package = "./;oidb";
|
||||
|
||||
message DeleteFileReqBody {
|
||||
int64 groupCode = 1;
|
||||
int32 appId = 2;
|
||||
int32 busId = 3;
|
||||
string parentFolderId = 4;
|
||||
string fileId = 5;
|
||||
optional int64 groupCode = 1;
|
||||
optional int32 appId = 2;
|
||||
optional int32 busId = 3;
|
||||
optional string parentFolderId = 4;
|
||||
optional string fileId = 5;
|
||||
}
|
||||
message DeleteFileRspBody {
|
||||
int32 retCode = 1;
|
||||
string retMsg = 2;
|
||||
string clientWording = 3;
|
||||
optional int32 retCode = 1;
|
||||
optional string retMsg = 2;
|
||||
optional string clientWording = 3;
|
||||
}
|
||||
message DownloadFileReqBody {
|
||||
int64 groupCode = 1;
|
||||
int32 appId = 2;
|
||||
int32 busId = 3;
|
||||
string fileId = 4;
|
||||
bool boolThumbnailReq = 5;
|
||||
int32 urlType = 6;
|
||||
bool boolPreviewReq = 7;
|
||||
optional int64 groupCode = 1;
|
||||
optional int32 appId = 2;
|
||||
optional int32 busId = 3;
|
||||
optional string fileId = 4;
|
||||
optional bool boolThumbnailReq = 5;
|
||||
optional int32 urlType = 6;
|
||||
optional bool boolPreviewReq = 7;
|
||||
}
|
||||
message DownloadFileRspBody {
|
||||
int32 retCode = 1;
|
||||
string retMsg = 2;
|
||||
string clientWording = 3;
|
||||
string downloadIp = 4;
|
||||
bytes downloadDns = 5;
|
||||
bytes downloadUrl = 6;
|
||||
bytes sha = 7;
|
||||
bytes sha3 = 8;
|
||||
bytes md5 = 9;
|
||||
bytes cookieVal = 10;
|
||||
string saveFileName = 11;
|
||||
int32 previewPort = 12;
|
||||
optional int32 retCode = 1;
|
||||
optional string retMsg = 2;
|
||||
optional string clientWording = 3;
|
||||
optional string downloadIp = 4;
|
||||
optional bytes downloadDns = 5;
|
||||
optional bytes downloadUrl = 6;
|
||||
optional bytes sha = 7;
|
||||
optional bytes sha3 = 8;
|
||||
optional bytes md5 = 9;
|
||||
optional bytes cookieVal = 10;
|
||||
optional string saveFileName = 11;
|
||||
optional int32 previewPort = 12;
|
||||
}
|
||||
message MoveFileReqBody {
|
||||
int64 groupCode = 1;
|
||||
int32 appId = 2;
|
||||
int32 busId = 3;
|
||||
string fileId = 4;
|
||||
string parentFolderId = 5;
|
||||
string destFolderId = 6;
|
||||
optional int64 groupCode = 1;
|
||||
optional int32 appId = 2;
|
||||
optional int32 busId = 3;
|
||||
optional string fileId = 4;
|
||||
optional string parentFolderId = 5;
|
||||
optional string destFolderId = 6;
|
||||
}
|
||||
message MoveFileRspBody {
|
||||
int32 retCode = 1;
|
||||
string retMsg = 2;
|
||||
string clientWording = 3;
|
||||
string parentFolderId = 4;
|
||||
optional int32 retCode = 1;
|
||||
optional string retMsg = 2;
|
||||
optional string clientWording = 3;
|
||||
optional string parentFolderId = 4;
|
||||
}
|
||||
message RenameFileReqBody {
|
||||
int64 groupCode = 1;
|
||||
int32 appId = 2;
|
||||
int32 busId = 3;
|
||||
string fileId = 4;
|
||||
string parentFolderId = 5;
|
||||
string newFileName = 6;
|
||||
optional int64 groupCode = 1;
|
||||
optional int32 appId = 2;
|
||||
optional int32 busId = 3;
|
||||
optional string fileId = 4;
|
||||
optional string parentFolderId = 5;
|
||||
optional string newFileName = 6;
|
||||
}
|
||||
message RenameFileRspBody {
|
||||
int32 retCode = 1;
|
||||
string retMsg = 2;
|
||||
string clientWording = 3;
|
||||
optional int32 retCode = 1;
|
||||
optional string retMsg = 2;
|
||||
optional string clientWording = 3;
|
||||
}
|
||||
message D6D6ReqBody {
|
||||
UploadFileReqBody uploadFileReq = 1;
|
||||
ResendReqBody resendFileReq = 2;
|
||||
DownloadFileReqBody downloadFileReq = 3;
|
||||
DeleteFileReqBody deleteFileReq = 4;
|
||||
RenameFileReqBody renameFileReq = 5;
|
||||
MoveFileReqBody moveFileReq = 6;
|
||||
optional UploadFileReqBody uploadFileReq = 1;
|
||||
optional ResendReqBody resendFileReq = 2;
|
||||
optional DownloadFileReqBody downloadFileReq = 3;
|
||||
optional DeleteFileReqBody deleteFileReq = 4;
|
||||
optional RenameFileReqBody renameFileReq = 5;
|
||||
optional MoveFileReqBody moveFileReq = 6;
|
||||
}
|
||||
message ResendReqBody {
|
||||
int64 groupCode = 1;
|
||||
int32 appId = 2;
|
||||
int32 busId = 3;
|
||||
string fileId = 4;
|
||||
bytes sha = 5;
|
||||
optional int64 groupCode = 1;
|
||||
optional int32 appId = 2;
|
||||
optional int32 busId = 3;
|
||||
optional string fileId = 4;
|
||||
optional bytes sha = 5;
|
||||
}
|
||||
message ResendRspBody {
|
||||
int32 retCode = 1;
|
||||
string retMsg = 2;
|
||||
string clientWording = 3;
|
||||
string uploadIp = 4;
|
||||
bytes fileKey = 5;
|
||||
bytes checkKey = 6;
|
||||
optional int32 retCode = 1;
|
||||
optional string retMsg = 2;
|
||||
optional string clientWording = 3;
|
||||
optional string uploadIp = 4;
|
||||
optional bytes fileKey = 5;
|
||||
optional bytes checkKey = 6;
|
||||
}
|
||||
message D6D6RspBody {
|
||||
UploadFileRspBody uploadFileRsp = 1;
|
||||
ResendRspBody resendFileRsp = 2;
|
||||
DownloadFileRspBody downloadFileRsp = 3;
|
||||
DeleteFileRspBody deleteFileRsp = 4;
|
||||
RenameFileRspBody renameFileRsp = 5;
|
||||
MoveFileRspBody moveFileRsp = 6;
|
||||
optional UploadFileRspBody uploadFileRsp = 1;
|
||||
optional ResendRspBody resendFileRsp = 2;
|
||||
optional DownloadFileRspBody downloadFileRsp = 3;
|
||||
optional DeleteFileRspBody deleteFileRsp = 4;
|
||||
optional RenameFileRspBody renameFileRsp = 5;
|
||||
optional MoveFileRspBody moveFileRsp = 6;
|
||||
}
|
||||
message UploadFileReqBody {
|
||||
int64 groupCode = 1;
|
||||
int32 appId = 2;
|
||||
int32 busId = 3;
|
||||
int32 entrance = 4;
|
||||
string parentFolderId = 5;
|
||||
string fileName = 6;
|
||||
string localPath = 7;
|
||||
int64 int64FileSize = 8;
|
||||
bytes sha = 9;
|
||||
bytes sha3 = 10;
|
||||
bytes md5 = 11;
|
||||
bool supportMultiUpload = 15;
|
||||
optional int64 groupCode = 1;
|
||||
optional int32 appId = 2;
|
||||
optional int32 busId = 3;
|
||||
optional int32 entrance = 4;
|
||||
optional string parentFolderId = 5;
|
||||
optional string fileName = 6;
|
||||
optional string localPath = 7;
|
||||
optional int64 int64FileSize = 8;
|
||||
optional bytes sha = 9;
|
||||
optional bytes sha3 = 10;
|
||||
optional bytes md5 = 11;
|
||||
optional bool supportMultiUpload = 15;
|
||||
}
|
||||
message UploadFileRspBody {
|
||||
int32 retCode = 1;
|
||||
string retMsg = 2;
|
||||
string clientWording = 3;
|
||||
string uploadIp = 4;
|
||||
string serverDns = 5;
|
||||
int32 busId = 6;
|
||||
string fileId = 7;
|
||||
bytes fileKey = 8;
|
||||
bytes checkKey = 9;
|
||||
bool boolFileExist = 10;
|
||||
optional int32 retCode = 1;
|
||||
optional string retMsg = 2;
|
||||
optional string clientWording = 3;
|
||||
optional string uploadIp = 4;
|
||||
optional string serverDns = 5;
|
||||
optional int32 busId = 6;
|
||||
optional string fileId = 7;
|
||||
optional bytes fileKey = 8;
|
||||
optional bytes checkKey = 9;
|
||||
optional bool boolFileExist = 10;
|
||||
repeated string uploadIpLanV4 = 12;
|
||||
repeated string uploadIpLanV6 = 13;
|
||||
int32 uploadPort = 14;
|
||||
optional int32 uploadPort = 14;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user