58 lines
1.1 KiB
Protocol Buffer
58 lines
1.1 KiB
Protocol Buffer
|
|
syntax = "proto3";
|
||
|
|
package cloud;
|
||
|
|
option go_package = ".;cloud";
|
||
|
|
|
||
|
|
|
||
|
|
// 通用响应消息
|
||
|
|
message Empty {}
|
||
|
|
|
||
|
|
// 通用ID请求
|
||
|
|
message IDRequest {
|
||
|
|
uint64 id = 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
message IdentRequest{
|
||
|
|
int64 id = 1; // 唯一ID
|
||
|
|
string identity = 2; // 唯一码
|
||
|
|
}
|
||
|
|
|
||
|
|
// 通用ID列表请求
|
||
|
|
message IDListRequest {
|
||
|
|
repeated uint64 ids = 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
// 列表请求参数
|
||
|
|
message FetchRequest {
|
||
|
|
int64 page_no=1 [json_name = "page_no"]; // 页数
|
||
|
|
int64 page_size=2 [json_name = "page_size"]; // 每页记录数
|
||
|
|
map<string,string> params=3; // 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// 基础时间戳和ID结构
|
||
|
|
message StdIicuds {
|
||
|
|
uint64 id = 1;
|
||
|
|
string created_at = 2;
|
||
|
|
string updated_at = 3;
|
||
|
|
string deleted_at = 4;
|
||
|
|
}
|
||
|
|
|
||
|
|
// 用户身份信息
|
||
|
|
message StdPassport {
|
||
|
|
uint64 passport_id = 1;
|
||
|
|
string passport_identity = 2;
|
||
|
|
}
|
||
|
|
|
||
|
|
// 云盘基础信息
|
||
|
|
message CloudBase {
|
||
|
|
uint64 cloud_id = 1;
|
||
|
|
string cloud_identity = 2;
|
||
|
|
}
|
||
|
|
|
||
|
|
// 状态回复
|
||
|
|
message StatusReply{
|
||
|
|
int32 code=1; // 状态码
|
||
|
|
string message=2; // 状态说明
|
||
|
|
string details=3; // 数据
|
||
|
|
int64 timeseq=4; // 响应时间序列
|
||
|
|
}
|