deviceid_test.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: lib/protocol/deviceid_test.proto
  3. package protocol
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. _ "github.com/syncthing/syncthing/proto/ext"
  9. io "io"
  10. math "math"
  11. math_bits "math/bits"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  22. type TestOldDeviceID struct {
  23. Test []byte `protobuf:"bytes,1,opt,name=test,proto3" json:"test" xml:"test"`
  24. }
  25. func (m *TestOldDeviceID) Reset() { *m = TestOldDeviceID{} }
  26. func (m *TestOldDeviceID) String() string { return proto.CompactTextString(m) }
  27. func (*TestOldDeviceID) ProtoMessage() {}
  28. func (*TestOldDeviceID) Descriptor() ([]byte, []int) {
  29. return fileDescriptor_f4a75253a19e48a2, []int{0}
  30. }
  31. func (m *TestOldDeviceID) XXX_Unmarshal(b []byte) error {
  32. return m.Unmarshal(b)
  33. }
  34. func (m *TestOldDeviceID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  35. if deterministic {
  36. return xxx_messageInfo_TestOldDeviceID.Marshal(b, m, deterministic)
  37. } else {
  38. b = b[:cap(b)]
  39. n, err := m.MarshalToSizedBuffer(b)
  40. if err != nil {
  41. return nil, err
  42. }
  43. return b[:n], nil
  44. }
  45. }
  46. func (m *TestOldDeviceID) XXX_Merge(src proto.Message) {
  47. xxx_messageInfo_TestOldDeviceID.Merge(m, src)
  48. }
  49. func (m *TestOldDeviceID) XXX_Size() int {
  50. return m.ProtoSize()
  51. }
  52. func (m *TestOldDeviceID) XXX_DiscardUnknown() {
  53. xxx_messageInfo_TestOldDeviceID.DiscardUnknown(m)
  54. }
  55. var xxx_messageInfo_TestOldDeviceID proto.InternalMessageInfo
  56. type TestNewDeviceID struct {
  57. Test DeviceID `protobuf:"bytes,1,opt,name=test,proto3,customtype=DeviceID" json:"test" xml:"test"`
  58. }
  59. func (m *TestNewDeviceID) Reset() { *m = TestNewDeviceID{} }
  60. func (m *TestNewDeviceID) String() string { return proto.CompactTextString(m) }
  61. func (*TestNewDeviceID) ProtoMessage() {}
  62. func (*TestNewDeviceID) Descriptor() ([]byte, []int) {
  63. return fileDescriptor_f4a75253a19e48a2, []int{1}
  64. }
  65. func (m *TestNewDeviceID) XXX_Unmarshal(b []byte) error {
  66. return m.Unmarshal(b)
  67. }
  68. func (m *TestNewDeviceID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  69. if deterministic {
  70. return xxx_messageInfo_TestNewDeviceID.Marshal(b, m, deterministic)
  71. } else {
  72. b = b[:cap(b)]
  73. n, err := m.MarshalToSizedBuffer(b)
  74. if err != nil {
  75. return nil, err
  76. }
  77. return b[:n], nil
  78. }
  79. }
  80. func (m *TestNewDeviceID) XXX_Merge(src proto.Message) {
  81. xxx_messageInfo_TestNewDeviceID.Merge(m, src)
  82. }
  83. func (m *TestNewDeviceID) XXX_Size() int {
  84. return m.ProtoSize()
  85. }
  86. func (m *TestNewDeviceID) XXX_DiscardUnknown() {
  87. xxx_messageInfo_TestNewDeviceID.DiscardUnknown(m)
  88. }
  89. var xxx_messageInfo_TestNewDeviceID proto.InternalMessageInfo
  90. func init() {
  91. proto.RegisterType((*TestOldDeviceID)(nil), "protocol.TestOldDeviceID")
  92. proto.RegisterType((*TestNewDeviceID)(nil), "protocol.TestNewDeviceID")
  93. }
  94. func init() { proto.RegisterFile("lib/protocol/deviceid_test.proto", fileDescriptor_f4a75253a19e48a2) }
  95. var fileDescriptor_f4a75253a19e48a2 = []byte{
  96. // 237 bytes of a gzipped FileDescriptorProto
  97. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xc8, 0xc9, 0x4c, 0xd2,
  98. 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x4f, 0x49, 0x2d, 0xcb, 0x4c, 0x4e, 0xcd,
  99. 0x4c, 0x89, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x03, 0x0b, 0x0b, 0x71, 0xc0, 0x64, 0xa5, 0x38, 0x53,
  100. 0x2b, 0xa0, 0x82, 0x52, 0xca, 0x45, 0xa9, 0x05, 0xf9, 0xc5, 0x10, 0x8d, 0x49, 0xa5, 0x69, 0xfa,
  101. 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x0e, 0x98, 0x05, 0x51, 0xa4, 0x64, 0xcb, 0xc5, 0x1f, 0x92, 0x5a,
  102. 0x5c, 0xe2, 0x9f, 0x93, 0xe2, 0x02, 0x36, 0xd7, 0xd3, 0x45, 0x48, 0x8b, 0x8b, 0x05, 0x64, 0xb4,
  103. 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x8f, 0x93, 0xd8, 0xab, 0x7b, 0xf2, 0x60, 0xfe, 0xa7, 0x7b, 0xf2,
  104. 0x5c, 0x15, 0xb9, 0x39, 0x56, 0x4a, 0x20, 0x8e, 0x52, 0x10, 0x58, 0x4c, 0x29, 0x10, 0xa2, 0xdd,
  105. 0x2f, 0xb5, 0x1c, 0xae, 0xdd, 0x0e, 0x45, 0xbb, 0xd6, 0x89, 0x7b, 0xf2, 0x0c, 0xb7, 0xee, 0xc9,
  106. 0x73, 0xc0, 0xe4, 0xb1, 0x1b, 0xd7, 0x71, 0x41, 0x85, 0x11, 0x62, 0xa4, 0x93, 0xef, 0x89, 0x87,
  107. 0x72, 0x0c, 0x17, 0x1e, 0xca, 0x31, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x84,
  108. 0xc7, 0x72, 0x0c, 0x0b, 0x1e, 0xcb, 0x31, 0x5e, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43,
  109. 0x94, 0x76, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x65, 0x5e,
  110. 0x72, 0x49, 0x46, 0x66, 0x5e, 0x3a, 0x12, 0x0b, 0x39, 0xb8, 0x92, 0xd8, 0xc0, 0x2c, 0x63, 0x40,
  111. 0x00, 0x00, 0x00, 0xff, 0xff, 0x9a, 0x0a, 0x77, 0x43, 0x45, 0x01, 0x00, 0x00,
  112. }
  113. func (m *TestOldDeviceID) Marshal() (dAtA []byte, err error) {
  114. size := m.ProtoSize()
  115. dAtA = make([]byte, size)
  116. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  117. if err != nil {
  118. return nil, err
  119. }
  120. return dAtA[:n], nil
  121. }
  122. func (m *TestOldDeviceID) MarshalTo(dAtA []byte) (int, error) {
  123. size := m.ProtoSize()
  124. return m.MarshalToSizedBuffer(dAtA[:size])
  125. }
  126. func (m *TestOldDeviceID) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  127. i := len(dAtA)
  128. _ = i
  129. var l int
  130. _ = l
  131. if len(m.Test) > 0 {
  132. i -= len(m.Test)
  133. copy(dAtA[i:], m.Test)
  134. i = encodeVarintDeviceidTest(dAtA, i, uint64(len(m.Test)))
  135. i--
  136. dAtA[i] = 0xa
  137. }
  138. return len(dAtA) - i, nil
  139. }
  140. func (m *TestNewDeviceID) Marshal() (dAtA []byte, err error) {
  141. size := m.ProtoSize()
  142. dAtA = make([]byte, size)
  143. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  144. if err != nil {
  145. return nil, err
  146. }
  147. return dAtA[:n], nil
  148. }
  149. func (m *TestNewDeviceID) MarshalTo(dAtA []byte) (int, error) {
  150. size := m.ProtoSize()
  151. return m.MarshalToSizedBuffer(dAtA[:size])
  152. }
  153. func (m *TestNewDeviceID) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  154. i := len(dAtA)
  155. _ = i
  156. var l int
  157. _ = l
  158. {
  159. size := m.Test.ProtoSize()
  160. i -= size
  161. if _, err := m.Test.MarshalTo(dAtA[i:]); err != nil {
  162. return 0, err
  163. }
  164. i = encodeVarintDeviceidTest(dAtA, i, uint64(size))
  165. }
  166. i--
  167. dAtA[i] = 0xa
  168. return len(dAtA) - i, nil
  169. }
  170. func encodeVarintDeviceidTest(dAtA []byte, offset int, v uint64) int {
  171. offset -= sovDeviceidTest(v)
  172. base := offset
  173. for v >= 1<<7 {
  174. dAtA[offset] = uint8(v&0x7f | 0x80)
  175. v >>= 7
  176. offset++
  177. }
  178. dAtA[offset] = uint8(v)
  179. return base
  180. }
  181. func (m *TestOldDeviceID) ProtoSize() (n int) {
  182. if m == nil {
  183. return 0
  184. }
  185. var l int
  186. _ = l
  187. l = len(m.Test)
  188. if l > 0 {
  189. n += 1 + l + sovDeviceidTest(uint64(l))
  190. }
  191. return n
  192. }
  193. func (m *TestNewDeviceID) ProtoSize() (n int) {
  194. if m == nil {
  195. return 0
  196. }
  197. var l int
  198. _ = l
  199. l = m.Test.ProtoSize()
  200. n += 1 + l + sovDeviceidTest(uint64(l))
  201. return n
  202. }
  203. func sovDeviceidTest(x uint64) (n int) {
  204. return (math_bits.Len64(x|1) + 6) / 7
  205. }
  206. func sozDeviceidTest(x uint64) (n int) {
  207. return sovDeviceidTest(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  208. }
  209. func (m *TestOldDeviceID) Unmarshal(dAtA []byte) error {
  210. l := len(dAtA)
  211. iNdEx := 0
  212. for iNdEx < l {
  213. preIndex := iNdEx
  214. var wire uint64
  215. for shift := uint(0); ; shift += 7 {
  216. if shift >= 64 {
  217. return ErrIntOverflowDeviceidTest
  218. }
  219. if iNdEx >= l {
  220. return io.ErrUnexpectedEOF
  221. }
  222. b := dAtA[iNdEx]
  223. iNdEx++
  224. wire |= uint64(b&0x7F) << shift
  225. if b < 0x80 {
  226. break
  227. }
  228. }
  229. fieldNum := int32(wire >> 3)
  230. wireType := int(wire & 0x7)
  231. if wireType == 4 {
  232. return fmt.Errorf("proto: TestOldDeviceID: wiretype end group for non-group")
  233. }
  234. if fieldNum <= 0 {
  235. return fmt.Errorf("proto: TestOldDeviceID: illegal tag %d (wire type %d)", fieldNum, wire)
  236. }
  237. switch fieldNum {
  238. case 1:
  239. if wireType != 2 {
  240. return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
  241. }
  242. var byteLen int
  243. for shift := uint(0); ; shift += 7 {
  244. if shift >= 64 {
  245. return ErrIntOverflowDeviceidTest
  246. }
  247. if iNdEx >= l {
  248. return io.ErrUnexpectedEOF
  249. }
  250. b := dAtA[iNdEx]
  251. iNdEx++
  252. byteLen |= int(b&0x7F) << shift
  253. if b < 0x80 {
  254. break
  255. }
  256. }
  257. if byteLen < 0 {
  258. return ErrInvalidLengthDeviceidTest
  259. }
  260. postIndex := iNdEx + byteLen
  261. if postIndex < 0 {
  262. return ErrInvalidLengthDeviceidTest
  263. }
  264. if postIndex > l {
  265. return io.ErrUnexpectedEOF
  266. }
  267. m.Test = append(m.Test[:0], dAtA[iNdEx:postIndex]...)
  268. if m.Test == nil {
  269. m.Test = []byte{}
  270. }
  271. iNdEx = postIndex
  272. default:
  273. iNdEx = preIndex
  274. skippy, err := skipDeviceidTest(dAtA[iNdEx:])
  275. if err != nil {
  276. return err
  277. }
  278. if skippy < 0 {
  279. return ErrInvalidLengthDeviceidTest
  280. }
  281. if (iNdEx + skippy) < 0 {
  282. return ErrInvalidLengthDeviceidTest
  283. }
  284. if (iNdEx + skippy) > l {
  285. return io.ErrUnexpectedEOF
  286. }
  287. iNdEx += skippy
  288. }
  289. }
  290. if iNdEx > l {
  291. return io.ErrUnexpectedEOF
  292. }
  293. return nil
  294. }
  295. func (m *TestNewDeviceID) Unmarshal(dAtA []byte) error {
  296. l := len(dAtA)
  297. iNdEx := 0
  298. for iNdEx < l {
  299. preIndex := iNdEx
  300. var wire uint64
  301. for shift := uint(0); ; shift += 7 {
  302. if shift >= 64 {
  303. return ErrIntOverflowDeviceidTest
  304. }
  305. if iNdEx >= l {
  306. return io.ErrUnexpectedEOF
  307. }
  308. b := dAtA[iNdEx]
  309. iNdEx++
  310. wire |= uint64(b&0x7F) << shift
  311. if b < 0x80 {
  312. break
  313. }
  314. }
  315. fieldNum := int32(wire >> 3)
  316. wireType := int(wire & 0x7)
  317. if wireType == 4 {
  318. return fmt.Errorf("proto: TestNewDeviceID: wiretype end group for non-group")
  319. }
  320. if fieldNum <= 0 {
  321. return fmt.Errorf("proto: TestNewDeviceID: illegal tag %d (wire type %d)", fieldNum, wire)
  322. }
  323. switch fieldNum {
  324. case 1:
  325. if wireType != 2 {
  326. return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
  327. }
  328. var byteLen int
  329. for shift := uint(0); ; shift += 7 {
  330. if shift >= 64 {
  331. return ErrIntOverflowDeviceidTest
  332. }
  333. if iNdEx >= l {
  334. return io.ErrUnexpectedEOF
  335. }
  336. b := dAtA[iNdEx]
  337. iNdEx++
  338. byteLen |= int(b&0x7F) << shift
  339. if b < 0x80 {
  340. break
  341. }
  342. }
  343. if byteLen < 0 {
  344. return ErrInvalidLengthDeviceidTest
  345. }
  346. postIndex := iNdEx + byteLen
  347. if postIndex < 0 {
  348. return ErrInvalidLengthDeviceidTest
  349. }
  350. if postIndex > l {
  351. return io.ErrUnexpectedEOF
  352. }
  353. if err := m.Test.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  354. return err
  355. }
  356. iNdEx = postIndex
  357. default:
  358. iNdEx = preIndex
  359. skippy, err := skipDeviceidTest(dAtA[iNdEx:])
  360. if err != nil {
  361. return err
  362. }
  363. if skippy < 0 {
  364. return ErrInvalidLengthDeviceidTest
  365. }
  366. if (iNdEx + skippy) < 0 {
  367. return ErrInvalidLengthDeviceidTest
  368. }
  369. if (iNdEx + skippy) > l {
  370. return io.ErrUnexpectedEOF
  371. }
  372. iNdEx += skippy
  373. }
  374. }
  375. if iNdEx > l {
  376. return io.ErrUnexpectedEOF
  377. }
  378. return nil
  379. }
  380. func skipDeviceidTest(dAtA []byte) (n int, err error) {
  381. l := len(dAtA)
  382. iNdEx := 0
  383. depth := 0
  384. for iNdEx < l {
  385. var wire uint64
  386. for shift := uint(0); ; shift += 7 {
  387. if shift >= 64 {
  388. return 0, ErrIntOverflowDeviceidTest
  389. }
  390. if iNdEx >= l {
  391. return 0, io.ErrUnexpectedEOF
  392. }
  393. b := dAtA[iNdEx]
  394. iNdEx++
  395. wire |= (uint64(b) & 0x7F) << shift
  396. if b < 0x80 {
  397. break
  398. }
  399. }
  400. wireType := int(wire & 0x7)
  401. switch wireType {
  402. case 0:
  403. for shift := uint(0); ; shift += 7 {
  404. if shift >= 64 {
  405. return 0, ErrIntOverflowDeviceidTest
  406. }
  407. if iNdEx >= l {
  408. return 0, io.ErrUnexpectedEOF
  409. }
  410. iNdEx++
  411. if dAtA[iNdEx-1] < 0x80 {
  412. break
  413. }
  414. }
  415. case 1:
  416. iNdEx += 8
  417. case 2:
  418. var length int
  419. for shift := uint(0); ; shift += 7 {
  420. if shift >= 64 {
  421. return 0, ErrIntOverflowDeviceidTest
  422. }
  423. if iNdEx >= l {
  424. return 0, io.ErrUnexpectedEOF
  425. }
  426. b := dAtA[iNdEx]
  427. iNdEx++
  428. length |= (int(b) & 0x7F) << shift
  429. if b < 0x80 {
  430. break
  431. }
  432. }
  433. if length < 0 {
  434. return 0, ErrInvalidLengthDeviceidTest
  435. }
  436. iNdEx += length
  437. case 3:
  438. depth++
  439. case 4:
  440. if depth == 0 {
  441. return 0, ErrUnexpectedEndOfGroupDeviceidTest
  442. }
  443. depth--
  444. case 5:
  445. iNdEx += 4
  446. default:
  447. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  448. }
  449. if iNdEx < 0 {
  450. return 0, ErrInvalidLengthDeviceidTest
  451. }
  452. if depth == 0 {
  453. return iNdEx, nil
  454. }
  455. }
  456. return 0, io.ErrUnexpectedEOF
  457. }
  458. var (
  459. ErrInvalidLengthDeviceidTest = fmt.Errorf("proto: negative length found during unmarshaling")
  460. ErrIntOverflowDeviceidTest = fmt.Errorf("proto: integer overflow")
  461. ErrUnexpectedEndOfGroupDeviceidTest = fmt.Errorf("proto: unexpected end of group")
  462. )