sample.proto 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright (c) 2016, Google Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package test;
  16. service Sample {
  17. rpc Get(SampleMessage) returns (SampleMessage) {}
  18. rpc Update(stream SampleMessage) returns (stream SampleMessage) {}
  19. }
  20. message SampleMessage {
  21. double d = 1;
  22. float f = 2;
  23. int64 i64 = 3;
  24. uint64 ui64 = 4;
  25. int32 i32 = 5;
  26. fixed64 f64 = 6;
  27. fixed32 f32 = 7;
  28. bool b = 8;
  29. string text = 9;
  30. SampleMessage message = 11;
  31. bytes data = 12;
  32. uint32 ui32 = 13;
  33. sfixed32 sf32 = 15;
  34. sfixed64 sf64 = 16;
  35. sint32 si32 = 17;
  36. sint64 si64 = 18;
  37. }