test.pb.go.golden 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. // Code generated by protoc-gen-go from "test.proto"
  2. // DO NOT EDIT!
  3. package my_test
  4. import proto "goprotobuf.googlecode.com/hg/proto"
  5. import imp "imp.pb"
  6. // Reference proto import to suppress error if it's not otherwise used.
  7. var _ = proto.GetString
  8. type HatType int32
  9. const (
  10. HatType_FEDORA = 1
  11. HatType_FEZ = 2
  12. )
  13. var HatType_name = map[int32] string {
  14. 1: "FEDORA",
  15. 2: "FEZ",
  16. }
  17. var HatType_value = map[string] int32 {
  18. "FEDORA": 1,
  19. "FEZ": 2,
  20. }
  21. func NewHatType(x int32) *HatType {
  22. e := HatType(x)
  23. return &e
  24. }
  25. type Days int32
  26. const (
  27. Days_MONDAY = 1
  28. Days_TUESDAY = 2
  29. Days_LUNDI = 1
  30. )
  31. var Days_name = map[int32] string {
  32. 1: "MONDAY",
  33. 2: "TUESDAY",
  34. // Duplicate value: 1: "LUNDI",
  35. }
  36. var Days_value = map[string] int32 {
  37. "MONDAY": 1,
  38. "TUESDAY": 2,
  39. "LUNDI": 1,
  40. }
  41. func NewDays(x int32) *Days {
  42. e := Days(x)
  43. return &e
  44. }
  45. type Request_Color int32
  46. const (
  47. Request_RED = 0
  48. Request_GREEN = 1
  49. Request_BLUE = 2
  50. )
  51. var Request_Color_name = map[int32] string {
  52. 0: "RED",
  53. 1: "GREEN",
  54. 2: "BLUE",
  55. }
  56. var Request_Color_value = map[string] int32 {
  57. "RED": 0,
  58. "GREEN": 1,
  59. "BLUE": 2,
  60. }
  61. func NewRequest_Color(x int32) *Request_Color {
  62. e := Request_Color(x)
  63. return &e
  64. }
  65. type Reply_Entry_Game int32
  66. const (
  67. Reply_Entry_FOOTBALL = 1
  68. Reply_Entry_TENNIS = 2
  69. )
  70. var Reply_Entry_Game_name = map[int32] string {
  71. 1: "FOOTBALL",
  72. 2: "TENNIS",
  73. }
  74. var Reply_Entry_Game_value = map[string] int32 {
  75. "FOOTBALL": 1,
  76. "TENNIS": 2,
  77. }
  78. func NewReply_Entry_Game(x int32) *Reply_Entry_Game {
  79. e := Reply_Entry_Game(x)
  80. return &e
  81. }
  82. type Request struct {
  83. Key []int64 "PB(varint,1,rep,name=key)"
  84. ImportedMessage *imp.ImportedMessage "PB(bytes,2,opt,name=imported_message)"
  85. Hue *Request_Color "PB(varint,3,opt,name=hue,enum=my_test.Request_Color)"
  86. Hat *HatType "PB(varint,4,opt,name=hat,enum=my_test.HatType,def=1)"
  87. Owner *imp.ImportedMessage_Owner "PB(varint,6,opt,name=owner,enum=imp.ImportedMessage_Owner)"
  88. XXX_unrecognized []byte
  89. }
  90. func (this *Request) Reset() {
  91. *this = Request{}
  92. }
  93. const Default_Request_Hat HatType = HatType_FEDORA
  94. type Reply struct {
  95. Found []*Reply_Entry "PB(bytes,1,rep,name=found)"
  96. XXX_extensions map[int32][]byte
  97. XXX_unrecognized []byte
  98. }
  99. func (this *Reply) Reset() {
  100. *this = Reply{}
  101. }
  102. var extRange_Reply = []proto.ExtensionRange{
  103. proto.ExtensionRange{100, 536870911},
  104. }
  105. func (*Reply) ExtensionRangeArray() []proto.ExtensionRange {
  106. return extRange_Reply
  107. }
  108. func (this *Reply) ExtensionMap() map[int32][]byte {
  109. if this.XXX_extensions == nil {
  110. this.XXX_extensions = make(map[int32][]byte)
  111. }
  112. return this.XXX_extensions
  113. }
  114. type Reply_Entry struct {
  115. KeyThatNeeds_1234Camel_CasIng *int64 "PB(varint,1,req,name=key_that_needs_1234camel_CasIng)"
  116. Value *int64 "PB(varint,2,opt,name=value,def=7)"
  117. XMyFieldName_2 *int64 "PB(varint,3,opt,name=_my_field_name_2)"
  118. XXX_unrecognized []byte
  119. }
  120. func (this *Reply_Entry) Reset() {
  121. *this = Reply_Entry{}
  122. }
  123. const Default_Reply_Entry_Value int64 = 7
  124. type ReplyExtensions struct {
  125. XXX_unrecognized []byte
  126. }
  127. func (this *ReplyExtensions) Reset() {
  128. *this = ReplyExtensions{}
  129. }
  130. var E_ReplyExtensions_Time = &proto.ExtensionDesc{
  131. ExtendedType: (*Reply)(nil),
  132. ExtensionType: (*float64)(nil),
  133. Field: 101,
  134. Tag: "PB(fixed64,101,opt,name=time)",
  135. }
  136. var E_Tag = &proto.ExtensionDesc{
  137. ExtendedType: (*Reply)(nil),
  138. ExtensionType: (*string)(nil),
  139. Field: 103,
  140. Tag: "PB(bytes,103,opt,name=tag)",
  141. }
  142. func init() {
  143. proto.RegisterEnum("my_test.HatType", HatType_name, HatType_value)
  144. proto.RegisterEnum("my_test.Days", Days_name, Days_value)
  145. proto.RegisterEnum("my_test.Request_Color", Request_Color_name, Request_Color_value)
  146. proto.RegisterEnum("my_test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value)
  147. }