diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..eb4af37 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*.proto] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/protobuf/2.0/Authentication.proto b/protobuf/2.0/Authentication.proto index 7a78a9f..9f5a6ee 100644 --- a/protobuf/2.0/Authentication.proto +++ b/protobuf/2.0/Authentication.proto @@ -4,7 +4,7 @@ syntax = "proto3"; // Request logging into the server // seed: the seed used to generate the address message AuthenticationRequest { - fixed64 seed = 1; + fixed64 seed = 1; } // Server -> Client @@ -12,6 +12,6 @@ message AuthenticationRequest { // status: 0 if successful, anything else is an error // address: the address assigned to the peer message AuthenticationResponse { - uint32 status = 1; - fixed64 address = 2; -} \ No newline at end of file + uint32 status = 1; + fixed64 address = 2; +} diff --git a/protobuf/2.0/Container.proto b/protobuf/2.0/Container.proto index bdd7ec7..4f77145 100644 --- a/protobuf/2.0/Container.proto +++ b/protobuf/2.0/Container.proto @@ -2,17 +2,17 @@ syntax = "proto3"; // Client <-> Server message Container { - enum MessageType { - AuthenticationRequest = 0; - AuthenticationResponse = 1; - Message = 2; - PublishRequest = 3; - PublishResponse = 4; - DiscoverRequest = 5; - DiscoverResponse = 6; - } + enum MessageType { + AuthenticationRequest = 0; + AuthenticationResponse = 1; + Message = 2; + PublishRequest = 3; + PublishResponse = 4; + DiscoverRequest = 5; + DiscoverResponse = 6; + } - MessageType type = 1; - uint32 id = 2; - bytes data = 3; -} \ No newline at end of file + MessageType type = 1; + uint32 id = 2; + bytes data = 3; +} diff --git a/protobuf/2.0/Message.proto b/protobuf/2.0/Message.proto index 208098a..eff39aa 100644 --- a/protobuf/2.0/Message.proto +++ b/protobuf/2.0/Message.proto @@ -2,11 +2,11 @@ syntax = "proto3"; // Client <-> Server // address: -// Client -> Server: destination +// Client -> Server: destination // Server -> Client: source // data: message data message Message { - fixed64 address = 1; - fixed32 port = 2; - bytes data = 3; -} \ No newline at end of file + fixed64 address = 1; + fixed32 port = 2; + bytes data = 3; +} diff --git a/protobuf/2.0/PublishDiscover.proto b/protobuf/2.0/PublishDiscover.proto index 2e8b32e..afee672 100644 --- a/protobuf/2.0/PublishDiscover.proto +++ b/protobuf/2.0/PublishDiscover.proto @@ -8,16 +8,16 @@ syntax = "proto3"; // false: delete the port // flags: search flags message PublishRequest { - fixed32 port = 1; - bool publish = 2; - repeated string flags = 3; + fixed32 port = 1; + bool publish = 2; + repeated string flags = 3; } // Server -> Client // Acknowledge a PublishRequest // status: 0 if successful, anything else is an error message PublishResponse { - uint32 status = 1; + uint32 status = 1; } // Client -> Server @@ -25,8 +25,8 @@ message PublishResponse { // limit: maximum number of peers to search for // flags: flags to search for message DiscoverRequest { - uint32 limit = 1; - repeated string flags = 2; + uint32 limit = 1; + repeated string flags = 2; } // Server -> Client @@ -34,11 +34,11 @@ message DiscoverRequest { // status: 0 if successful, anything else is an error // peers: a list of peers, empty if nothing is found message DiscoverResponse { - message DiscoverPeer { - uint32 port = 1; - fixed64 address = 2; - repeated string flags = 3; - } - uint32 status = 1; - repeated DiscoverPeer peers = 2; + message DiscoverPeer { + uint32 port = 1; + fixed64 address = 2; + repeated string flags = 3; + } + uint32 status = 1; + repeated DiscoverPeer peers = 2; }