-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: rgallor <riccardo.gallo@secomind.com>
- Loading branch information
Showing
3 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
syntax = "proto3"; | ||
|
||
package edgehog_device_forwarder_proto; | ||
|
||
message Http { | ||
oneof message { | ||
Request request = 1; | ||
Response response = 2; | ||
} | ||
|
||
message Request { | ||
// ID univoco che identifica ciascuna richiesta http e la relativa risposta | ||
bytes request_id = 1; | ||
string path = 2; | ||
string method = 3; | ||
optional string querystring = 4; | ||
map<string, string> headers = 5; | ||
optional bytes payload = 6; | ||
} | ||
|
||
message Response { | ||
bytes request_id = 1; | ||
uint32 status_code = 2; | ||
map<string, string> headers = 3; | ||
optional bytes payload = 4; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
syntax = "proto3"; | ||
|
||
package edgehog_device_forwarder_proto; | ||
|
||
import "proto/http.proto"; | ||
import "proto/ws.proto"; | ||
|
||
message Message { | ||
oneof protocol { | ||
Http http = 1; | ||
WebSocket ws = 2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
syntax = "proto3"; | ||
|
||
package edgehog_device_forwarder_proto; | ||
|
||
message WebSocket { | ||
// ID che identifica ciascuna connessione websocket fra ttyd e il device (e fra edgehog e una pagina web della stessa sessione) | ||
bytes socket_id = 1; | ||
|
||
oneof message { | ||
string text = 2; | ||
bytes binary = 3; | ||
bytes ping = 4; | ||
bytes pong = 5; | ||
Close close = 6; | ||
} | ||
|
||
message Close { | ||
uint32 code = 1; // u16 | ||
optional string reason = 2; | ||
} | ||
} |