Make everything required

This commit is contained in:
2023-03-23 00:10:14 +01:00
parent 1d105a041d
commit d0747faf68
4 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ syntax = "proto3";
// Request logging into the server // Request logging into the server
// seed: the seed used to generate the address // seed: the seed used to generate the address
message AuthenticationRequest { message AuthenticationRequest {
fixed64 seed = 1; required fixed64 seed = 1;
} }
// Server -> Client // Server -> Client
@@ -12,6 +12,6 @@ message AuthenticationRequest {
// status: 0 if successful, anything else is an error // status: 0 if successful, anything else is an error
// address: the address assigned to the peer // address: the address assigned to the peer
message AuthenticationResponse { message AuthenticationResponse {
uint32 status = 1; required uint32 status = 1;
fixed64 address = 2; required fixed64 address = 2;
} }
+1 -1
View File
@@ -6,7 +6,7 @@ syntax = "proto3";
// Client <-> Server // Client <-> Server
message Container { message Container {
uint32 id = 1; required uint32 id = 1;
oneof message { oneof message {
AuthenticationRequest AuthenticationRequest = 2; AuthenticationRequest AuthenticationRequest = 2;
+3 -3
View File
@@ -6,7 +6,7 @@ syntax = "proto3";
// Server -> Client: source // Server -> Client: source
// data: message data // data: message data
message Message { message Message {
fixed64 address = 1; required fixed64 address = 1;
fixed32 port = 2; required fixed32 port = 2;
bytes data = 3; required bytes data = 3;
} }
+7 -7
View File
@@ -8,8 +8,8 @@ syntax = "proto3";
// false: delete the port // false: delete the port
// flags: search flags // flags: search flags
message PublishRequest { message PublishRequest {
fixed32 port = 1; required fixed32 port = 1;
bool publish = 2; required bool publish = 2;
repeated string flags = 3; repeated string flags = 3;
} }
@@ -17,7 +17,7 @@ message PublishRequest {
// Acknowledge a PublishRequest // Acknowledge a PublishRequest
// status: 0 if successful, anything else is an error // status: 0 if successful, anything else is an error
message PublishResponse { message PublishResponse {
uint32 status = 1; required uint32 status = 1;
} }
// Client -> Server // Client -> Server
@@ -25,7 +25,7 @@ message PublishResponse {
// limit: maximum number of peers to search for // limit: maximum number of peers to search for
// flags: flags to search for // flags: flags to search for
message DiscoverRequest { message DiscoverRequest {
uint32 limit = 1; required uint32 limit = 1;
repeated string flags = 2; repeated string flags = 2;
} }
@@ -35,10 +35,10 @@ message DiscoverRequest {
// peers: a list of peers, empty if nothing is found // peers: a list of peers, empty if nothing is found
message DiscoverResponse { message DiscoverResponse {
message DiscoverPeer { message DiscoverPeer {
uint32 port = 1; required uint32 port = 1;
fixed64 address = 2; required fixed64 address = 2;
repeated string flags = 3; repeated string flags = 3;
} }
uint32 status = 1; required uint32 status = 1;
repeated DiscoverPeer peers = 2; repeated DiscoverPeer peers = 2;
} }