deviceid_test.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  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) || (iNdEx+skippy) < 0 {
  279. return ErrInvalidLengthDeviceidTest
  280. }
  281. if (iNdEx + skippy) > l {
  282. return io.ErrUnexpectedEOF
  283. }
  284. iNdEx += skippy
  285. }
  286. }
  287. if iNdEx > l {
  288. return io.ErrUnexpectedEOF
  289. }
  290. return nil
  291. }
  292. func (m *TestNewDeviceID) Unmarshal(dAtA []byte) error {
  293. l := len(dAtA)
  294. iNdEx := 0
  295. for iNdEx < l {
  296. preIndex := iNdEx
  297. var wire uint64
  298. for shift := uint(0); ; shift += 7 {
  299. if shift >= 64 {
  300. return ErrIntOverflowDeviceidTest
  301. }
  302. if iNdEx >= l {
  303. return io.ErrUnexpectedEOF
  304. }
  305. b := dAtA[iNdEx]
  306. iNdEx++
  307. wire |= uint64(b&0x7F) << shift
  308. if b < 0x80 {
  309. break
  310. }
  311. }
  312. fieldNum := int32(wire >> 3)
  313. wireType := int(wire & 0x7)
  314. if wireType == 4 {
  315. return fmt.Errorf("proto: TestNewDeviceID: wiretype end group for non-group")
  316. }
  317. if fieldNum <= 0 {
  318. return fmt.Errorf("proto: TestNewDeviceID: illegal tag %d (wire type %d)", fieldNum, wire)
  319. }
  320. switch fieldNum {
  321. case 1:
  322. if wireType != 2 {
  323. return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType)
  324. }
  325. var byteLen int
  326. for shift := uint(0); ; shift += 7 {
  327. if shift >= 64 {
  328. return ErrIntOverflowDeviceidTest
  329. }
  330. if iNdEx >= l {
  331. return io.ErrUnexpectedEOF
  332. }
  333. b := dAtA[iNdEx]
  334. iNdEx++
  335. byteLen |= int(b&0x7F) << shift
  336. if b < 0x80 {
  337. break
  338. }
  339. }
  340. if byteLen < 0 {
  341. return ErrInvalidLengthDeviceidTest
  342. }
  343. postIndex := iNdEx + byteLen
  344. if postIndex < 0 {
  345. return ErrInvalidLengthDeviceidTest
  346. }
  347. if postIndex > l {
  348. return io.ErrUnexpectedEOF
  349. }
  350. if err := m.Test.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  351. return err
  352. }
  353. iNdEx = postIndex
  354. default:
  355. iNdEx = preIndex
  356. skippy, err := skipDeviceidTest(dAtA[iNdEx:])
  357. if err != nil {
  358. return err
  359. }
  360. if (skippy < 0) || (iNdEx+skippy) < 0 {
  361. return ErrInvalidLengthDeviceidTest
  362. }
  363. if (iNdEx + skippy) > l {
  364. return io.ErrUnexpectedEOF
  365. }
  366. iNdEx += skippy
  367. }
  368. }
  369. if iNdEx > l {
  370. return io.ErrUnexpectedEOF
  371. }
  372. return nil
  373. }
  374. func skipDeviceidTest(dAtA []byte) (n int, err error) {
  375. l := len(dAtA)
  376. iNdEx := 0
  377. depth := 0
  378. for iNdEx < l {
  379. var wire uint64
  380. for shift := uint(0); ; shift += 7 {
  381. if shift >= 64 {
  382. return 0, ErrIntOverflowDeviceidTest
  383. }
  384. if iNdEx >= l {
  385. return 0, io.ErrUnexpectedEOF
  386. }
  387. b := dAtA[iNdEx]
  388. iNdEx++
  389. wire |= (uint64(b) & 0x7F) << shift
  390. if b < 0x80 {
  391. break
  392. }
  393. }
  394. wireType := int(wire & 0x7)
  395. switch wireType {
  396. case 0:
  397. for shift := uint(0); ; shift += 7 {
  398. if shift >= 64 {
  399. return 0, ErrIntOverflowDeviceidTest
  400. }
  401. if iNdEx >= l {
  402. return 0, io.ErrUnexpectedEOF
  403. }
  404. iNdEx++
  405. if dAtA[iNdEx-1] < 0x80 {
  406. break
  407. }
  408. }
  409. case 1:
  410. iNdEx += 8
  411. case 2:
  412. var length int
  413. for shift := uint(0); ; shift += 7 {
  414. if shift >= 64 {
  415. return 0, ErrIntOverflowDeviceidTest
  416. }
  417. if iNdEx >= l {
  418. return 0, io.ErrUnexpectedEOF
  419. }
  420. b := dAtA[iNdEx]
  421. iNdEx++
  422. length |= (int(b) & 0x7F) << shift
  423. if b < 0x80 {
  424. break
  425. }
  426. }
  427. if length < 0 {
  428. return 0, ErrInvalidLengthDeviceidTest
  429. }
  430. iNdEx += length
  431. case 3:
  432. depth++
  433. case 4:
  434. if depth == 0 {
  435. return 0, ErrUnexpectedEndOfGroupDeviceidTest
  436. }
  437. depth--
  438. case 5:
  439. iNdEx += 4
  440. default:
  441. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  442. }
  443. if iNdEx < 0 {
  444. return 0, ErrInvalidLengthDeviceidTest
  445. }
  446. if depth == 0 {
  447. return iNdEx, nil
  448. }
  449. }
  450. return 0, io.ErrUnexpectedEOF
  451. }
  452. var (
  453. ErrInvalidLengthDeviceidTest = fmt.Errorf("proto: negative length found during unmarshaling")
  454. ErrIntOverflowDeviceidTest = fmt.Errorf("proto: integer overflow")
  455. ErrUnexpectedEndOfGroupDeviceidTest = fmt.Errorf("proto: unexpected end of group")
  456. )