lib/protocol: Use DeviceID in protocol messages, with custom marshalling
This makes the device ID a real type that can be used in the protobuf schema. That avoids the juggling back and forth from []byte in a bunch of places and simplifies the code. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3695
This commit is contained in:
committed by
Audrius Butkevicius
parent
1cdfef4d6a
commit
0296c23685
@@ -63,7 +63,7 @@ message Folder {
|
||||
}
|
||||
|
||||
message Device {
|
||||
bytes id = 1 [(gogoproto.customname) = "ID"];
|
||||
bytes id = 1 [(gogoproto.customname) = "ID", (gogoproto.customtype) = "DeviceID", (gogoproto.nullable) = false];
|
||||
string name = 2;
|
||||
repeated string addresses = 3;
|
||||
Compression compression = 4;
|
||||
|
||||
Reference in New Issue
Block a user