1
0

deviceid_test.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: deviceid_test.proto
  3. /*
  4. Package protocol is a generated protocol buffer package.
  5. It is generated from these files:
  6. deviceid_test.proto
  7. It has these top-level messages:
  8. TestOldDeviceID
  9. TestNewDeviceID
  10. */
  11. package protocol
  12. import proto "github.com/gogo/protobuf/proto"
  13. import fmt "fmt"
  14. import math "math"
  15. import _ "github.com/gogo/protobuf/gogoproto"
  16. import io "io"
  17. // Reference imports to suppress errors if they are not otherwise used.
  18. var _ = proto.Marshal
  19. var _ = fmt.Errorf
  20. var _ = math.Inf
  21. // This is a compile-time assertion to ensure that this generated file
  22. // is compatible with the proto package it is being compiled against.
  23. // A compilation error at this line likely means your copy of the
  24. // proto package needs to be updated.
  25. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  26. type TestOldDeviceID struct {
  27. Test []byte `protobuf:"bytes,1,opt,name=test,proto3" json:"test,omitempty"`
  28. }
  29. func (m *TestOldDeviceID) Reset() { *m = TestOldDeviceID{} }
  30. func (m *TestOldDeviceID) String() string { return proto.CompactTextString(m) }
  31. func (*TestOldDeviceID) ProtoMessage() {}
  32. func (*TestOldDeviceID) Descriptor() ([]byte, []int) { return fileDescriptorDeviceidTest, []int{0} }
  33. type TestNewDeviceID struct {
  34. Test DeviceID `protobuf:"bytes,1,opt,name=test,proto3,customtype=DeviceID" json:"test"`
  35. }
  36. func (m *TestNewDeviceID) Reset() { *m = TestNewDeviceID{} }
  37. func (m *TestNewDeviceID) String() string { return proto.CompactTextString(m) }
  38. func (*TestNewDeviceID) ProtoMessage() {}
  39. func (*TestNewDeviceID) Descriptor() ([]byte, []int) { return fileDescriptorDeviceidTest, []int{1} }
  40. func init() {
  41. proto.RegisterType((*TestOldDeviceID)(nil), "protocol.TestOldDeviceID")
  42. proto.RegisterType((*TestNewDeviceID)(nil), "protocol.TestNewDeviceID")
  43. }
  44. func (m *TestOldDeviceID) Marshal() (dAtA []byte, err error) {
  45. size := m.ProtoSize()
  46. dAtA = make([]byte, size)
  47. n, err := m.MarshalTo(dAtA)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return dAtA[:n], nil
  52. }
  53. func (m *TestOldDeviceID) MarshalTo(dAtA []byte) (int, error) {
  54. var i int
  55. _ = i
  56. var l int
  57. _ = l
  58. if len(m.Test) > 0 {
  59. dAtA[i] = 0xa
  60. i++
  61. i = encodeVarintDeviceidTest(dAtA, i, uint64(len(m.Test)))
  62. i += copy(dAtA[i:], m.Test)
  63. }
  64. return i, nil
  65. }
  66. func (m *TestNewDeviceID) Marshal() (dAtA []byte, err error) {
  67. size := m.ProtoSize()
  68. dAtA = make([]byte, size)
  69. n, err := m.MarshalTo(dAtA)
  70. if err != nil {
  71. return nil, err
  72. }
  73. return dAtA[:n], nil
  74. }
  75. func (m *TestNewDeviceID) MarshalTo(dAtA []byte) (int, error) {
  76. var i int
  77. _ = i
  78. var l int
  79. _ = l
  80. dAtA[i] = 0xa
  81. i++
  82. i = encodeVarintDeviceidTest(dAtA, i, uint64(m.Test.ProtoSize()))
  83. n1, err := m.Test.MarshalTo(dAtA[i:])
  84. if err != nil {
  85. return 0, err
  86. }
  87. i += n1
  88. return i, nil
  89. }
  90. func encodeFixed64DeviceidTest(dAtA []byte, offset int, v uint64) int {
  91. dAtA[offset] = uint8(v)
  92. dAtA[offset+1] = uint8(v >> 8)
  93. dAtA[offset+2] = uint8(v >> 16)
  94. dAtA[offset+3] = uint8(v >> 24)
  95. dAtA[offset+4] = uint8(v >> 32)
  96. dAtA[offset+5] = uint8(v >> 40)
  97. dAtA[offset+6] = uint8(v >> 48)
  98. dAtA[offset+7] = uint8(v >> 56)
  99. return offset + 8
  100. }
  101. func encodeFixed32DeviceidTest(dAtA []byte, offset int, v uint32) int {
  102. dAtA[offset] = uint8(v)
  103. dAtA[offset+1] = uint8(v >> 8)
  104. dAtA[offset+2] = uint8(v >> 16)
  105. dAtA[offset+3] = uint8(v >> 24)
  106. return offset + 4
  107. }
  108. func encodeVarintDeviceidTest(dAtA []byte, offset int, v uint64) int {
  109. for v >= 1<<7 {
  110. dAtA[offset] = uint8(v&0x7f | 0x80)
  111. v >>= 7
  112. offset++
  113. }
  114. dAtA[offset] = uint8(v)
  115. return offset + 1
  116. }
  117. func (m *TestOldDeviceID) ProtoSize() (n int) {
  118. var l int
  119. _ = l
  120. l = len(m.Test)
  121. if l > 0 {
  122. n += 1 + l + sovDeviceidTest(uint64(l))
  123. }
  124. return n
  125. }
  126. func (m *TestNewDeviceID) ProtoSize() (n int) {
  127. var l int
  128. _ = l
  129. l = m.Test.ProtoSize()
  130. n += 1 + l + sovDeviceidTest(uint64(l))
  131. return n
  132. }
  133. func sovDeviceidTest(x uint64) (n int) {
  134. for {
  135. n++
  136. x >>= 7
  137. if x == 0 {
  138. break
  139. }
  140. }
  141. return n
  142. }
  143. func sozDeviceidTest(x uint64) (n int) {
  144. return sovDeviceidTest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  145. }
  146. func (m *TestOldDeviceID) Unmarshal(dAtA []byte) error {
  147. l := len(dAtA)
  148. iNdEx := 0
  149. for iNdEx < l {
  150. preIndex := iNdEx
  151. var wire uint64
  152. for shift := uint(0); ; shift += 7 {
  153. if shift >= 64 {
  154. return ErrIntOverflowDeviceidTest
  155. }
  156. if iNdEx >= l {
  157. return io.ErrUnexpectedEOF
  158. }
  159. b := dAtA[iNdEx]
  160. iNdEx++
  161. wire |= (uint64(b) & 0x7F) << shift
  162. if b < 0x80 {
  163. break
  164. }
  165. }
  166. fieldNum := int32(wire >> 3)
  167. wireType := int(wire & 0x7)
  168. if wireType == 4 {
  169. return fmt.Errorf("proto: TestOldDeviceID: wiretype end group for non-group")
  170. }
  171. if fieldNum <= 0 {
  172. return fmt.Errorf("proto: TestOldDeviceID: illegal tag %d (wire type %d)", fieldNum, wire)
  173. }
  174. switch fieldNum {
  175. case 1:
  176. if wireType != 2 {
  177. return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
  178. }
  179. var byteLen int
  180. for shift := uint(0); ; shift += 7 {
  181. if shift >= 64 {
  182. return ErrIntOverflowDeviceidTest
  183. }
  184. if iNdEx >= l {
  185. return io.ErrUnexpectedEOF
  186. }
  187. b := dAtA[iNdEx]
  188. iNdEx++
  189. byteLen |= (int(b) & 0x7F) << shift
  190. if b < 0x80 {
  191. break
  192. }
  193. }
  194. if byteLen < 0 {
  195. return ErrInvalidLengthDeviceidTest
  196. }
  197. postIndex := iNdEx + byteLen
  198. if postIndex > l {
  199. return io.ErrUnexpectedEOF
  200. }
  201. m.Test = append(m.Test[:0], dAtA[iNdEx:postIndex]...)
  202. if m.Test == nil {
  203. m.Test = []byte{}
  204. }
  205. iNdEx = postIndex
  206. default:
  207. iNdEx = preIndex
  208. skippy, err := skipDeviceidTest(dAtA[iNdEx:])
  209. if err != nil {
  210. return err
  211. }
  212. if skippy < 0 {
  213. return ErrInvalidLengthDeviceidTest
  214. }
  215. if (iNdEx + skippy) > l {
  216. return io.ErrUnexpectedEOF
  217. }
  218. iNdEx += skippy
  219. }
  220. }
  221. if iNdEx > l {
  222. return io.ErrUnexpectedEOF
  223. }
  224. return nil
  225. }
  226. func (m *TestNewDeviceID) Unmarshal(dAtA []byte) error {
  227. l := len(dAtA)
  228. iNdEx := 0
  229. for iNdEx < l {
  230. preIndex := iNdEx
  231. var wire uint64
  232. for shift := uint(0); ; shift += 7 {
  233. if shift >= 64 {
  234. return ErrIntOverflowDeviceidTest
  235. }
  236. if iNdEx >= l {
  237. return io.ErrUnexpectedEOF
  238. }
  239. b := dAtA[iNdEx]
  240. iNdEx++
  241. wire |= (uint64(b) & 0x7F) << shift
  242. if b < 0x80 {
  243. break
  244. }
  245. }
  246. fieldNum := int32(wire >> 3)
  247. wireType := int(wire & 0x7)
  248. if wireType == 4 {
  249. return fmt.Errorf("proto: TestNewDeviceID: wiretype end group for non-group")
  250. }
  251. if fieldNum <= 0 {
  252. return fmt.Errorf("proto: TestNewDeviceID: illegal tag %d (wire type %d)", fieldNum, wire)
  253. }
  254. switch fieldNum {
  255. case 1:
  256. if wireType != 2 {
  257. return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
  258. }
  259. var byteLen int
  260. for shift := uint(0); ; shift += 7 {
  261. if shift >= 64 {
  262. return ErrIntOverflowDeviceidTest
  263. }
  264. if iNdEx >= l {
  265. return io.ErrUnexpectedEOF
  266. }
  267. b := dAtA[iNdEx]
  268. iNdEx++
  269. byteLen |= (int(b) & 0x7F) << shift
  270. if b < 0x80 {
  271. break
  272. }
  273. }
  274. if byteLen < 0 {
  275. return ErrInvalidLengthDeviceidTest
  276. }
  277. postIndex := iNdEx + byteLen
  278. if postIndex > l {
  279. return io.ErrUnexpectedEOF
  280. }
  281. if err := m.Test.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  282. return err
  283. }
  284. iNdEx = postIndex
  285. default:
  286. iNdEx = preIndex
  287. skippy, err := skipDeviceidTest(dAtA[iNdEx:])
  288. if err != nil {
  289. return err
  290. }
  291. if skippy < 0 {
  292. return ErrInvalidLengthDeviceidTest
  293. }
  294. if (iNdEx + skippy) > l {
  295. return io.ErrUnexpectedEOF
  296. }
  297. iNdEx += skippy
  298. }
  299. }
  300. if iNdEx > l {
  301. return io.ErrUnexpectedEOF
  302. }
  303. return nil
  304. }
  305. func skipDeviceidTest(dAtA []byte) (n int, err error) {
  306. l := len(dAtA)
  307. iNdEx := 0
  308. for iNdEx < l {
  309. var wire uint64
  310. for shift := uint(0); ; shift += 7 {
  311. if shift >= 64 {
  312. return 0, ErrIntOverflowDeviceidTest
  313. }
  314. if iNdEx >= l {
  315. return 0, io.ErrUnexpectedEOF
  316. }
  317. b := dAtA[iNdEx]
  318. iNdEx++
  319. wire |= (uint64(b) & 0x7F) << shift
  320. if b < 0x80 {
  321. break
  322. }
  323. }
  324. wireType := int(wire & 0x7)
  325. switch wireType {
  326. case 0:
  327. for shift := uint(0); ; shift += 7 {
  328. if shift >= 64 {
  329. return 0, ErrIntOverflowDeviceidTest
  330. }
  331. if iNdEx >= l {
  332. return 0, io.ErrUnexpectedEOF
  333. }
  334. iNdEx++
  335. if dAtA[iNdEx-1] < 0x80 {
  336. break
  337. }
  338. }
  339. return iNdEx, nil
  340. case 1:
  341. iNdEx += 8
  342. return iNdEx, nil
  343. case 2:
  344. var length int
  345. for shift := uint(0); ; shift += 7 {
  346. if shift >= 64 {
  347. return 0, ErrIntOverflowDeviceidTest
  348. }
  349. if iNdEx >= l {
  350. return 0, io.ErrUnexpectedEOF
  351. }
  352. b := dAtA[iNdEx]
  353. iNdEx++
  354. length |= (int(b) & 0x7F) << shift
  355. if b < 0x80 {
  356. break
  357. }
  358. }
  359. iNdEx += length
  360. if length < 0 {
  361. return 0, ErrInvalidLengthDeviceidTest
  362. }
  363. return iNdEx, nil
  364. case 3:
  365. for {
  366. var innerWire uint64
  367. var start int = iNdEx
  368. for shift := uint(0); ; shift += 7 {
  369. if shift >= 64 {
  370. return 0, ErrIntOverflowDeviceidTest
  371. }
  372. if iNdEx >= l {
  373. return 0, io.ErrUnexpectedEOF
  374. }
  375. b := dAtA[iNdEx]
  376. iNdEx++
  377. innerWire |= (uint64(b) & 0x7F) << shift
  378. if b < 0x80 {
  379. break
  380. }
  381. }
  382. innerWireType := int(innerWire & 0x7)
  383. if innerWireType == 4 {
  384. break
  385. }
  386. next, err := skipDeviceidTest(dAtA[start:])
  387. if err != nil {
  388. return 0, err
  389. }
  390. iNdEx = start + next
  391. }
  392. return iNdEx, nil
  393. case 4:
  394. return iNdEx, nil
  395. case 5:
  396. iNdEx += 4
  397. return iNdEx, nil
  398. default:
  399. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  400. }
  401. }
  402. panic("unreachable")
  403. }
  404. var (
  405. ErrInvalidLengthDeviceidTest = fmt.Errorf("proto: negative length found during unmarshaling")
  406. ErrIntOverflowDeviceidTest = fmt.Errorf("proto: integer overflow")
  407. )
  408. func init() { proto.RegisterFile("deviceid_test.proto", fileDescriptorDeviceidTest) }
  409. var fileDescriptorDeviceidTest = []byte{
  410. // 176 bytes of a gzipped FileDescriptorProto
  411. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4e, 0x49, 0x2d, 0xcb,
  412. 0x4c, 0x4e, 0xcd, 0x4c, 0x89, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17,
  413. 0xe2, 0x00, 0x53, 0xc9, 0xf9, 0x39, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9,
  414. 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0x99, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc,
  415. 0x01, 0xb3, 0x20, 0x1a, 0x95, 0x54, 0xb9, 0xf8, 0x43, 0x52, 0x8b, 0x4b, 0xfc, 0x73, 0x52, 0x5c,
  416. 0xc0, 0xc6, 0x7a, 0xba, 0x08, 0x09, 0x71, 0xb1, 0x80, 0x4c, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0,
  417. 0x09, 0x02, 0xb3, 0x95, 0xcc, 0x21, 0xca, 0xfc, 0x52, 0xcb, 0xe1, 0xca, 0x54, 0x90, 0x95, 0x39,
  418. 0x09, 0x9c, 0xb8, 0x27, 0xcf, 0x70, 0xeb, 0x9e, 0x3c, 0x07, 0x4c, 0x1e, 0xa2, 0xd1, 0x49, 0xe6,
  419. 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e,
  420. 0xf1, 0xc1, 0x23, 0x39, 0x86, 0x17, 0x8f, 0xe4, 0x18, 0x16, 0x3c, 0x96, 0x63, 0x4c, 0x62, 0x03,
  421. 0x3b, 0xc2, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x35, 0x9c, 0x00, 0x78, 0xd4, 0x00, 0x00, 0x00,
  422. }