Protobuf does not support checking messages out of the box, but it can be added using a plugin (this is the only way, however, it is not easy).
( ).
, :
package yourcompany;
import "google/protobuf/descriptor.proto";
extend google.protobuf.FieldOptions {
optional string validator = 51234;
}
. :
message Update {
string sensor_id = 1 [(yourcompany.validator) = "SENSOR-???????"];
}
-, , :
, , . . " " plugin.proto. , , , RPC, RPC. . , , .
.