forked from openimsdk/protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththird.proto
228 lines (189 loc) · 4.81 KB
/
third.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
// 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.
syntax = "proto3";
package openim.third;
import "sdkws/sdkws.proto";
option go_package = "github.com/openimsdk/protocol/third";
message KeyValues {
string key = 1;
repeated string values = 2;
}
message SignPart {
int32 partNumber = 1;
string url = 2;
repeated KeyValues query = 3;
repeated KeyValues header = 4;
}
message AuthSignParts {
string url = 1;
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;
string urlPrefix = 8;
}
message UploadInfo {
string uploadID = 1;
int64 partSize = 2;
AuthSignParts sign = 3;
int64 expireTime = 4;
}
message InitiateMultipartUploadResp {
string url = 1;
UploadInfo upload = 2;
}
message AuthSignReq {
string uploadID = 1;
repeated int32 partNumbers = 2;
}
message AuthSignResp {
string url = 1;
repeated KeyValues query = 2;
repeated KeyValues header = 3;
repeated SignPart parts = 4;
}
message CompleteMultipartUploadReq {
string uploadID = 1;
repeated string parts = 2;
string name = 3;
string contentType = 4;
string cause = 5;
string urlPrefix = 6;
}
message CompleteMultipartUploadResp {
string url = 1;
}
message AccessURLReq {
string name = 1;
map<string, string> query = 2;
}
message AccessURLResp {
string url = 1;
int64 expireTime = 2;
}
message InitiateFormDataReq {
string name = 1;
int64 size = 2;
string contentType = 3;
string group = 4;
int64 millisecond = 5;
bool absolute = 6;
}
message InitiateFormDataResp {
string id = 1;
string url = 2;
string file = 3;
repeated KeyValues header = 4;
map<string, string> formData = 5;
int64 expires = 6;
repeated int32 successCodes = 7;
}
message CompleteFormDataReq {
string id = 1;
string urlPrefix = 2;
}
message CompleteFormDataResp {
string url = 1;
}
message DeleteOutdatedDataReq {
int64 expireTime = 1;
}
message DeleteOutdatedDataResp {}
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 {}
message fileURL {
string filename = 1;
string URL = 2;
}
message UploadLogsReq {
int32 platform = 1;
repeated fileURL fileURLs = 2;
string systemType = 3;
string version = 5;
string ex = 4;
}
message UploadLogsResp {}
message DeleteLogsReq {
repeated string logIDs = 1;
}
message DeleteLogsResp {}
message SearchLogsReq {
string keyword = 1;
int64 startTime = 2;
int64 endTime = 3;
sdkws.RequestPagination pagination = 4;
}
message LogInfo {
string userID = 1;
string platform = 2;
string url = 3;
int64 createTime = 4;
string nickname = 5;
string logID = 6;
string filename = 7;
string systemType = 8;
string ex = 9;
string version = 10;
}
message SearchLogsResp {
repeated LogInfo logsInfos = 1;
uint32 total = 2;
}
service third {
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);
rpc InitiateFormData(InitiateFormDataReq) returns (InitiateFormDataResp);
rpc CompleteFormData(CompleteFormDataReq) returns (CompleteFormDataResp);
rpc DeleteOutdatedData(DeleteOutdatedDataReq) returns (DeleteOutdatedDataResp);
rpc FcmUpdateToken(FcmUpdateTokenReq) returns (FcmUpdateTokenResp);
rpc SetAppBadge(SetAppBadgeReq) returns (SetAppBadgeResp);
//日志
rpc UploadLogs(UploadLogsReq) returns (UploadLogsResp);
rpc DeleteLogs(DeleteLogsReq) returns (DeleteLogsResp);
rpc SearchLogs(SearchLogsReq) returns (SearchLogsResp);
}