mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: add resource service definition
This commit is contained in:
29
proto/api/v2/resource_service.proto
Normal file
29
proto/api/v2/resource_service.proto
Normal file
@@ -0,0 +1,29 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service ResourceService {
|
||||
rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/resources"};
|
||||
}
|
||||
}
|
||||
|
||||
message Resource {
|
||||
int32 id = 1;
|
||||
int64 created_ts = 2;
|
||||
string filename = 3;
|
||||
string external_link = 4;
|
||||
string type = 5;
|
||||
int64 size = 6;
|
||||
optional int32 related_memo_id = 7;
|
||||
}
|
||||
|
||||
message ListResourcesRequest {}
|
||||
|
||||
message ListResourcesResponse {
|
||||
repeated Resource resources = 1;
|
||||
}
|
Reference in New Issue
Block a user