From 99d37a5ef23ae8fb0b95aea7896f36c5775ac3a5 Mon Sep 17 00:00:00 2001 From: "menghaiwen@fusen.cn" Date: Mon, 4 Dec 2023 18:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9C=8D=E5=8A=A1:resource?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/resource.proto | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 service/resource.proto diff --git a/service/resource.proto b/service/resource.proto new file mode 100644 index 0000000..9ab70bd --- /dev/null +++ b/service/resource.proto @@ -0,0 +1,48 @@ +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 { + + // 获取资源详情 + rpc GetResourceInfo(GetResourceInfoReq) returns (GetResourceInfoRes) { + option (google.api.http) = { + get: "/api/resource/info" + }; + } +} + +/* 获取资源详情 */ +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; +} +message GetResourceInfoRes { + string resource_id = 1; + int64 guest_id =2; + int64 user_id =3; + string resource_type = 4; + string resource_url = 5; + string version = 6; + int64 api_type = 7; + string bucket_name = 8; + string source = 9; + string uploaded_at = 10; + google.protobuf.Struct metadata = 11; +} +/* 获取资源详情 */ \ No newline at end of file