2023-12-04 10:21:07 +00:00
|
|
|
|
syntax = "proto3"; //版本声明,使用v3版本
|
|
|
|
|
|
|
|
|
|
package resource;
|
|
|
|
|
option go_package = "gitlab.fusenpack.com/backend/resource;service";
|
|
|
|
|
|
|
|
|
|
// 导入google/api/annotations.proto 注释依赖
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
import "service/basic.proto";
|
|
|
|
|
import "google/protobuf/struct.proto";
|
|
|
|
|
import "google/protobuf/any.proto";
|
|
|
|
|
|
|
|
|
|
//定义服务
|
|
|
|
|
service resource {
|
|
|
|
|
|
|
|
|
|
// 获取资源详情
|
2023-12-05 07:40:46 +00:00
|
|
|
|
rpc GetResourceInfo(GetResourceInfoReq) returns (basic.Response) {
|
2023-12-04 10:21:07 +00:00
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/api/resource/info"
|
|
|
|
|
};
|
|
|
|
|
}
|
2023-12-05 08:12:13 +00:00
|
|
|
|
|
|
|
|
|
// 获取资源列表
|
|
|
|
|
rpc GetResourceList(GetResourceListReq) returns (basic.Response) {
|
|
|
|
|
option (google.api.http) = {
|
|
|
|
|
get: "/api/resource/list"
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* 获取资源列表 */
|
|
|
|
|
message GetResourceList{
|
|
|
|
|
optional string resource_id = 1;
|
|
|
|
|
optional int64 guest_id =2;
|
|
|
|
|
optional int64 user_id =3;
|
|
|
|
|
optional string resource_type = 4;
|
|
|
|
|
optional string resource_url = 5;
|
|
|
|
|
optional string version = 6;
|
|
|
|
|
optional int64 api_type = 7;
|
|
|
|
|
optional string bucket_name = 8;
|
|
|
|
|
optional string source = 9;
|
|
|
|
|
|
|
|
|
|
optional int64 current_page =100;
|
|
|
|
|
optional int64 per_page =200;
|
2023-12-04 10:21:07 +00:00
|
|
|
|
}
|
2023-12-05 08:12:13 +00:00
|
|
|
|
/* 获取资源列表 */
|
2023-12-04 10:21:07 +00:00
|
|
|
|
|
|
|
|
|
/* 获取资源详情 */
|
|
|
|
|
message GetResourceInfoReq{
|
|
|
|
|
optional string resource_id = 1;
|
|
|
|
|
optional int64 guest_id =2;
|
|
|
|
|
optional int64 user_id =3;
|
|
|
|
|
optional string resource_type = 4;
|
|
|
|
|
optional string resource_url = 5;
|
|
|
|
|
optional string version = 6;
|
|
|
|
|
optional int64 api_type = 7;
|
|
|
|
|
optional string bucket_name = 8;
|
|
|
|
|
optional string source = 9;
|
|
|
|
|
}
|
|
|
|
|
/* 获取资源详情 */
|