Files
open-im-server/pkg/proto/third/third.proto
T

145 lines
3.0 KiB
Protocol Buffer
Raw Normal View History

2023-07-04 11:15:20 +08:00
// Copyright © 2023 OpenIM. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
2023-06-30 09:45:02 +08:00
syntax = "proto3";
package OpenIMServer.third;
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third";
2023-07-12 15:31:24 +08:00
message KeyValues {
string key = 1;
repeated string values = 2;
2023-06-30 09:45:02 +08:00
}
2023-07-12 15:31:24 +08:00
message SignPart {
int32 partNumber = 1;
string url = 2;
repeated KeyValues query = 3;
repeated KeyValues header = 4;
}
message AuthSignParts {
2023-06-30 09:45:02 +08:00
string url = 1;
2023-07-12 15:31:24 +08:00
repeated KeyValues query = 2;
repeated KeyValues header = 3;
repeated SignPart parts = 4;
}
message PartLimitReq {
}
message PartLimitResp {
int64 minPartSize = 1;
int64 maxPartSize = 2;
int32 maxNumSize = 3;
}
message PartSizeReq {
int64 size = 1;
}
message PartSizeResp {
int64 size = 2;
}
message InitiateMultipartUploadReq {
string hash = 1;
int64 size = 2;
int64 partSize = 3;
int32 maxParts = 4;
string cause = 5;
string name = 6;
string contentType = 7;
2023-06-30 09:45:02 +08:00
}
2023-07-12 15:31:24 +08:00
message UploadInfo {
string uploadID = 1;
int64 partSize = 2;
AuthSignParts sign = 3;
int64 expireTime = 4;
2023-06-30 09:45:02 +08:00
}
2023-07-12 15:31:24 +08:00
message InitiateMultipartUploadResp {
2023-06-30 09:45:02 +08:00
string url = 1;
2023-07-12 15:31:24 +08:00
UploadInfo upload = 2;
2023-06-30 09:45:02 +08:00
}
2023-07-12 15:31:24 +08:00
message AuthSignReq {
string uploadID = 1;
repeated int32 partNumbers = 2;
2023-06-30 09:45:02 +08:00
}
2023-07-12 15:31:24 +08:00
message AuthSignResp {
2023-06-30 09:45:02 +08:00
string url = 1;
2023-07-12 15:31:24 +08:00
repeated KeyValues query = 2;
repeated KeyValues header = 3;
repeated SignPart parts = 4;
2023-06-30 09:45:02 +08:00
}
2023-07-12 15:31:24 +08:00
message CompleteMultipartUploadReq {
string uploadID = 1;
repeated string parts = 2;
string name = 3;
string contentType = 4;
string cause = 5;
2023-06-30 09:45:02 +08:00
}
2023-07-12 15:31:24 +08:00
message CompleteMultipartUploadResp {
string url = 1;
2023-06-30 09:45:02 +08:00
}
2023-07-12 15:31:24 +08:00
message AccessURLReq {
2023-06-30 09:45:02 +08:00
string name = 1;
}
2023-07-12 15:31:24 +08:00
message AccessURLResp {
string url = 1;
int64 expireTime = 2;
2023-06-30 09:45:02 +08:00
}
message FcmUpdateTokenReq {
int32 platformID = 1;
string fcmToken = 2;
string account = 3;
int64 expireTime = 4;
}
message FcmUpdateTokenResp {
}
message SetAppBadgeReq {
string userID = 1;
int32 appUnreadCount = 2;
}
message SetAppBadgeResp {
}
service third {
2023-07-12 15:31:24 +08:00
rpc PartLimit(PartLimitReq) returns(PartLimitResp);
rpc PartSize(PartSizeReq) returns(PartSizeResp);
rpc InitiateMultipartUpload(InitiateMultipartUploadReq) returns(InitiateMultipartUploadResp);
rpc AuthSign(AuthSignReq) returns(AuthSignResp);
rpc CompleteMultipartUpload(CompleteMultipartUploadReq) returns(CompleteMultipartUploadResp);
rpc AccessURL(AccessURLReq) returns(AccessURLResp);
2023-06-30 09:45:02 +08:00
rpc FcmUpdateToken(FcmUpdateTokenReq) returns(FcmUpdateTokenResp);
rpc SetAppBadge(SetAppBadgeReq) returns(SetAppBadgeResp);
}