forked from andeya/wasmesh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
message.proto
52 lines (47 loc) · 1.01 KB
/
message.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
//! https://github.com/stepancheg/rust-protobuf
//! protoc --rust_out . message.proto
syntax = "proto3";
enum Scheme {
// HTTP scheme
HTTP = 0;
// HTTPS scheme
HTTPS = 1;
// RPC scheme
RPC = 2;
// wasp name server scheme
WNS = 3;
}
enum Method {
GET = 0;
HEAD = 1;
POST = 2;
PUT = 3;
DELETE = 4;
CONNECT = 5;
OPTIONS = 6;
TRACE = 7;
PATCH = 8;
ONEWAY = 9;
}
message Request {
// Ordered sequence number identifying the message.
int32 seqid = 1;
// Does the request require no response.
Method method = 2;
// Service call the message is associated with.
string uri = 3;
// Message headers.
map<string, string> headers = 4;
// Message body bytes.
bytes body = 5;
}
message Response {
// Ordered sequence number identifying the message.
int32 seqid = 1;
// The response's status
int32 status = 2;
// Message headers.
map<string, string> headers = 3;
// Message body bytes.
bytes body = 4;
}