header.proto 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Protocol Buffers for Go with Gadgets
  2. //
  3. // Copyright (c) 2013, The GoGo Authors. All rights reserved.
  4. // http://github.com/gogo/protobuf
  5. //
  6. // Go support for Protocol Buffers - Google's data interchange format
  7. //
  8. // Copyright 2014 The Go Authors. All rights reserved.
  9. // https://github.com/golang/protobuf
  10. //
  11. // Redistribution and use in source and binary forms, with or without
  12. // modification, are permitted provided that the following conditions are
  13. // met:
  14. //
  15. // * Redistributions of source code must retain the above copyright
  16. // notice, this list of conditions and the following disclaimer.
  17. // * Redistributions in binary form must reproduce the above
  18. // copyright notice, this list of conditions and the following disclaimer
  19. // in the documentation and/or other materials provided with the
  20. // distribution.
  21. // * Neither the name of Google Inc. nor the names of its
  22. // contributors may be used to endorse or promote products derived from
  23. // this software without specific prior written permission.
  24. //
  25. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  26. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  27. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  28. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  29. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  30. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  31. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  32. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  33. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  34. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  35. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  36. syntax = "proto2";
  37. package proto2.maps;
  38. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  39. option (gogoproto.goproto_stringer_all) = false;
  40. option (gogoproto.goproto_enum_prefix_all) = false;
  41. option (gogoproto.goproto_getters_all) = false;
  42. option (gogoproto.equal_all) = true;
  43. option (gogoproto.verbose_equal_all) = true;
  44. option (gogoproto.stringer_all) = true;
  45. option (gogoproto.gostring_all) = true;
  46. option (gogoproto.face_all) = true;
  47. option (gogoproto.description_all) = true;
  48. option (gogoproto.testgen_all) = true;
  49. option (gogoproto.populate_all) = true;
  50. option (gogoproto.benchgen_all) = true;
  51. option (gogoproto.unmarshaler_all) = false;
  52. option (gogoproto.marshaler_all) = false;
  53. option (gogoproto.sizer_all) = true;
  54. option (gogoproto.goproto_enum_stringer_all) = false;
  55. option (gogoproto.enum_stringer_all) = true;
  56. option (gogoproto.unsafe_marshaler_all) = false;
  57. option (gogoproto.unsafe_unmarshaler_all) = false;
  58. message FloatingPoint {
  59. optional double f = 1;
  60. }
  61. message CustomMap {
  62. map<string, bytes> Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"];
  63. map<string, bytes> Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false];
  64. map<string, bytes> NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"];
  65. map<string, bytes> Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false];
  66. }