proto.pb.go 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: proto.proto
  3. /*
  4. Package custombytesnonstruct is a generated protocol buffer package.
  5. It is generated from these files:
  6. proto.proto
  7. It has these top-level messages:
  8. Object
  9. */
  10. package custombytesnonstruct
  11. import proto "github.com/gogo/protobuf/proto"
  12. import fmt "fmt"
  13. import math "math"
  14. import _ "github.com/gogo/protobuf/gogoproto"
  15. import io "io"
  16. // Reference imports to suppress errors if they are not otherwise used.
  17. var _ = proto.Marshal
  18. var _ = fmt.Errorf
  19. var _ = math.Inf
  20. // This is a compile-time assertion to ensure that this generated file
  21. // is compatible with the proto package it is being compiled against.
  22. // A compilation error at this line likely means your copy of the
  23. // proto package needs to be updated.
  24. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  25. type Object struct {
  26. CustomField1 *CustomType `protobuf:"bytes,1,opt,name=CustomField1,customtype=CustomType" json:"CustomField1,omitempty"`
  27. CustomField2 []CustomType `protobuf:"bytes,2,rep,name=CustomField2,customtype=CustomType" json:"CustomField2,omitempty"`
  28. XXX_unrecognized []byte `json:"-"`
  29. }
  30. func (m *Object) Reset() { *m = Object{} }
  31. func (m *Object) String() string { return proto.CompactTextString(m) }
  32. func (*Object) ProtoMessage() {}
  33. func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} }
  34. func init() {
  35. proto.RegisterType((*Object)(nil), "custombytesnonstruct.Object")
  36. }
  37. func (m *Object) Unmarshal(dAtA []byte) error {
  38. l := len(dAtA)
  39. iNdEx := 0
  40. for iNdEx < l {
  41. preIndex := iNdEx
  42. var wire uint64
  43. for shift := uint(0); ; shift += 7 {
  44. if shift >= 64 {
  45. return ErrIntOverflowProto
  46. }
  47. if iNdEx >= l {
  48. return io.ErrUnexpectedEOF
  49. }
  50. b := dAtA[iNdEx]
  51. iNdEx++
  52. wire |= (uint64(b) & 0x7F) << shift
  53. if b < 0x80 {
  54. break
  55. }
  56. }
  57. fieldNum := int32(wire >> 3)
  58. wireType := int(wire & 0x7)
  59. if wireType == 4 {
  60. return fmt.Errorf("proto: Object: wiretype end group for non-group")
  61. }
  62. if fieldNum <= 0 {
  63. return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire)
  64. }
  65. switch fieldNum {
  66. case 1:
  67. if wireType != 2 {
  68. return fmt.Errorf("proto: wrong wireType = %d for field CustomField1", wireType)
  69. }
  70. var byteLen int
  71. for shift := uint(0); ; shift += 7 {
  72. if shift >= 64 {
  73. return ErrIntOverflowProto
  74. }
  75. if iNdEx >= l {
  76. return io.ErrUnexpectedEOF
  77. }
  78. b := dAtA[iNdEx]
  79. iNdEx++
  80. byteLen |= (int(b) & 0x7F) << shift
  81. if b < 0x80 {
  82. break
  83. }
  84. }
  85. if byteLen < 0 {
  86. return ErrInvalidLengthProto
  87. }
  88. postIndex := iNdEx + byteLen
  89. if postIndex > l {
  90. return io.ErrUnexpectedEOF
  91. }
  92. var v CustomType
  93. m.CustomField1 = &v
  94. if err := m.CustomField1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  95. return err
  96. }
  97. iNdEx = postIndex
  98. case 2:
  99. if wireType != 2 {
  100. return fmt.Errorf("proto: wrong wireType = %d for field CustomField2", wireType)
  101. }
  102. var byteLen int
  103. for shift := uint(0); ; shift += 7 {
  104. if shift >= 64 {
  105. return ErrIntOverflowProto
  106. }
  107. if iNdEx >= l {
  108. return io.ErrUnexpectedEOF
  109. }
  110. b := dAtA[iNdEx]
  111. iNdEx++
  112. byteLen |= (int(b) & 0x7F) << shift
  113. if b < 0x80 {
  114. break
  115. }
  116. }
  117. if byteLen < 0 {
  118. return ErrInvalidLengthProto
  119. }
  120. postIndex := iNdEx + byteLen
  121. if postIndex > l {
  122. return io.ErrUnexpectedEOF
  123. }
  124. var v CustomType
  125. m.CustomField2 = append(m.CustomField2, v)
  126. if err := m.CustomField2[len(m.CustomField2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  127. return err
  128. }
  129. iNdEx = postIndex
  130. default:
  131. iNdEx = preIndex
  132. skippy, err := skipProto(dAtA[iNdEx:])
  133. if err != nil {
  134. return err
  135. }
  136. if skippy < 0 {
  137. return ErrInvalidLengthProto
  138. }
  139. if (iNdEx + skippy) > l {
  140. return io.ErrUnexpectedEOF
  141. }
  142. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  143. iNdEx += skippy
  144. }
  145. }
  146. if iNdEx > l {
  147. return io.ErrUnexpectedEOF
  148. }
  149. return nil
  150. }
  151. func skipProto(dAtA []byte) (n int, err error) {
  152. l := len(dAtA)
  153. iNdEx := 0
  154. for iNdEx < l {
  155. var wire uint64
  156. for shift := uint(0); ; shift += 7 {
  157. if shift >= 64 {
  158. return 0, ErrIntOverflowProto
  159. }
  160. if iNdEx >= l {
  161. return 0, io.ErrUnexpectedEOF
  162. }
  163. b := dAtA[iNdEx]
  164. iNdEx++
  165. wire |= (uint64(b) & 0x7F) << shift
  166. if b < 0x80 {
  167. break
  168. }
  169. }
  170. wireType := int(wire & 0x7)
  171. switch wireType {
  172. case 0:
  173. for shift := uint(0); ; shift += 7 {
  174. if shift >= 64 {
  175. return 0, ErrIntOverflowProto
  176. }
  177. if iNdEx >= l {
  178. return 0, io.ErrUnexpectedEOF
  179. }
  180. iNdEx++
  181. if dAtA[iNdEx-1] < 0x80 {
  182. break
  183. }
  184. }
  185. return iNdEx, nil
  186. case 1:
  187. iNdEx += 8
  188. return iNdEx, nil
  189. case 2:
  190. var length int
  191. for shift := uint(0); ; shift += 7 {
  192. if shift >= 64 {
  193. return 0, ErrIntOverflowProto
  194. }
  195. if iNdEx >= l {
  196. return 0, io.ErrUnexpectedEOF
  197. }
  198. b := dAtA[iNdEx]
  199. iNdEx++
  200. length |= (int(b) & 0x7F) << shift
  201. if b < 0x80 {
  202. break
  203. }
  204. }
  205. iNdEx += length
  206. if length < 0 {
  207. return 0, ErrInvalidLengthProto
  208. }
  209. return iNdEx, nil
  210. case 3:
  211. for {
  212. var innerWire uint64
  213. var start int = iNdEx
  214. for shift := uint(0); ; shift += 7 {
  215. if shift >= 64 {
  216. return 0, ErrIntOverflowProto
  217. }
  218. if iNdEx >= l {
  219. return 0, io.ErrUnexpectedEOF
  220. }
  221. b := dAtA[iNdEx]
  222. iNdEx++
  223. innerWire |= (uint64(b) & 0x7F) << shift
  224. if b < 0x80 {
  225. break
  226. }
  227. }
  228. innerWireType := int(innerWire & 0x7)
  229. if innerWireType == 4 {
  230. break
  231. }
  232. next, err := skipProto(dAtA[start:])
  233. if err != nil {
  234. return 0, err
  235. }
  236. iNdEx = start + next
  237. }
  238. return iNdEx, nil
  239. case 4:
  240. return iNdEx, nil
  241. case 5:
  242. iNdEx += 4
  243. return iNdEx, nil
  244. default:
  245. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  246. }
  247. }
  248. panic("unreachable")
  249. }
  250. var (
  251. ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling")
  252. ErrIntOverflowProto = fmt.Errorf("proto: integer overflow")
  253. )
  254. func init() { proto.RegisterFile("proto.proto", fileDescriptorProto) }
  255. var fileDescriptorProto = []byte{
  256. // 147 bytes of a gzipped FileDescriptorProto
  257. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f,
  258. 0xc9, 0xd7, 0x03, 0x93, 0x42, 0x22, 0xc9, 0xa5, 0xc5, 0x25, 0xf9, 0xb9, 0x49, 0x95, 0x25, 0xa9,
  259. 0xc5, 0x79, 0xf9, 0x79, 0xc5, 0x25, 0x45, 0xa5, 0xc9, 0x25, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19,
  260. 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xc5, 0x49, 0xa5,
  261. 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x0c, 0x51, 0x2a, 0xe0, 0x62, 0xf3, 0x4f, 0xca, 0x4a,
  262. 0x4d, 0x2e, 0x11, 0x32, 0xe2, 0xe2, 0x71, 0x06, 0x1b, 0xe8, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x28,
  263. 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe3, 0xc4, 0x77, 0xeb, 0x9e, 0x3c, 0x17, 0x44, 0x3c, 0xa4, 0xb2,
  264. 0x20, 0x35, 0x08, 0x45, 0x0d, 0x9a, 0x1e, 0x23, 0x09, 0x26, 0x05, 0x66, 0x02, 0x7a, 0x8c, 0x9c,
  265. 0x58, 0x2e, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xc6, 0xf3, 0xe3, 0xca,
  266. 0x00, 0x00, 0x00,
  267. }