test.pb.go.golden 3.3 KB

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