-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsakuin.proto
62 lines (43 loc) · 1.08 KB
/
sakuin.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
syntax = "proto3";
package proto;
option go_package = "github.com/z5labs/sakuin/proto";
import "google/protobuf/any.proto";
service Sakuin {
rpc GetObject (GetObjectRequest) returns (GetObjectResponse);
rpc UpdateObject (UpdateObjectRequest) returns (UpdateObjectResponse);
rpc GetMetadata (GetMetadataRequest) returns (GetMetadataResponse);
rpc UpdateMetadata (UpdateMetadataRequest) returns (UpdateMetadataResponse);
rpc Index (IndexRequest) returns (IndexResponse);
}
message GetObjectRequest {
string id = 1;
}
message GetObjectResponse {
bytes content = 1;
}
message UpdateObjectRequest {
string id = 1;
bytes content = 2;
}
message UpdateObjectResponse {}
message GetMetadataRequest {
string id = 1;
}
message JSONMetadata {
bytes json = 1;
}
message GetMetadataResponse {
google.protobuf.Any metadata = 1;
}
message UpdateMetadataRequest {
string id = 1;
google.protobuf.Any metadata = 2;
}
message UpdateMetadataResponse {}
message IndexRequest {
google.protobuf.Any metadata = 1;
bytes object = 2;
}
message IndexResponse {
string id = 1;
}