model.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: model.proto
  3. /*
  4. Package archive is a generated protocol buffer package.
  5. It is generated from these files:
  6. model.proto
  7. It has these top-level messages:
  8. Info
  9. */
  10. package archive
  11. import proto "github.com/golang/protobuf/proto"
  12. import fmt "fmt"
  13. import math "math"
  14. import io "io"
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  24. type Info struct {
  25. Aid int64 `protobuf:"varint,1,opt,name=aid,proto3" json:"aid,omitempty"`
  26. Cids []int64 `protobuf:"varint,2,rep,packed,name=cids" json:"cids,omitempty"`
  27. State int32 `protobuf:"varint,3,opt,name=state,proto3" json:"state,omitempty"`
  28. Mid int64 `protobuf:"varint,4,opt,name=mid,proto3" json:"mid,omitempty"`
  29. Attribute int32 `protobuf:"varint,5,opt,name=attribute,proto3" json:"attribute,omitempty"`
  30. }
  31. func (m *Info) Reset() { *m = Info{} }
  32. func (m *Info) String() string { return proto.CompactTextString(m) }
  33. func (*Info) ProtoMessage() {}
  34. func (*Info) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{0} }
  35. func (m *Info) GetAid() int64 {
  36. if m != nil {
  37. return m.Aid
  38. }
  39. return 0
  40. }
  41. func (m *Info) GetCids() []int64 {
  42. if m != nil {
  43. return m.Cids
  44. }
  45. return nil
  46. }
  47. func (m *Info) GetState() int32 {
  48. if m != nil {
  49. return m.State
  50. }
  51. return 0
  52. }
  53. func (m *Info) GetMid() int64 {
  54. if m != nil {
  55. return m.Mid
  56. }
  57. return 0
  58. }
  59. func (m *Info) GetAttribute() int32 {
  60. if m != nil {
  61. return m.Attribute
  62. }
  63. return 0
  64. }
  65. func init() {
  66. proto.RegisterType((*Info)(nil), "archive.Info")
  67. }
  68. func (m *Info) Marshal() (dAtA []byte, err error) {
  69. size := m.Size()
  70. dAtA = make([]byte, size)
  71. n, err := m.MarshalTo(dAtA)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return dAtA[:n], nil
  76. }
  77. func (m *Info) MarshalTo(dAtA []byte) (int, error) {
  78. var i int
  79. _ = i
  80. var l int
  81. _ = l
  82. if m.Aid != 0 {
  83. dAtA[i] = 0x8
  84. i++
  85. i = encodeVarintModel(dAtA, i, uint64(m.Aid))
  86. }
  87. if len(m.Cids) > 0 {
  88. dAtA2 := make([]byte, len(m.Cids)*10)
  89. var j1 int
  90. for _, num1 := range m.Cids {
  91. num := uint64(num1)
  92. for num >= 1<<7 {
  93. dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
  94. num >>= 7
  95. j1++
  96. }
  97. dAtA2[j1] = uint8(num)
  98. j1++
  99. }
  100. dAtA[i] = 0x12
  101. i++
  102. i = encodeVarintModel(dAtA, i, uint64(j1))
  103. i += copy(dAtA[i:], dAtA2[:j1])
  104. }
  105. if m.State != 0 {
  106. dAtA[i] = 0x18
  107. i++
  108. i = encodeVarintModel(dAtA, i, uint64(m.State))
  109. }
  110. if m.Mid != 0 {
  111. dAtA[i] = 0x20
  112. i++
  113. i = encodeVarintModel(dAtA, i, uint64(m.Mid))
  114. }
  115. if m.Attribute != 0 {
  116. dAtA[i] = 0x28
  117. i++
  118. i = encodeVarintModel(dAtA, i, uint64(m.Attribute))
  119. }
  120. return i, nil
  121. }
  122. func encodeFixed64Model(dAtA []byte, offset int, v uint64) int {
  123. dAtA[offset] = uint8(v)
  124. dAtA[offset+1] = uint8(v >> 8)
  125. dAtA[offset+2] = uint8(v >> 16)
  126. dAtA[offset+3] = uint8(v >> 24)
  127. dAtA[offset+4] = uint8(v >> 32)
  128. dAtA[offset+5] = uint8(v >> 40)
  129. dAtA[offset+6] = uint8(v >> 48)
  130. dAtA[offset+7] = uint8(v >> 56)
  131. return offset + 8
  132. }
  133. func encodeFixed32Model(dAtA []byte, offset int, v uint32) int {
  134. dAtA[offset] = uint8(v)
  135. dAtA[offset+1] = uint8(v >> 8)
  136. dAtA[offset+2] = uint8(v >> 16)
  137. dAtA[offset+3] = uint8(v >> 24)
  138. return offset + 4
  139. }
  140. func encodeVarintModel(dAtA []byte, offset int, v uint64) int {
  141. for v >= 1<<7 {
  142. dAtA[offset] = uint8(v&0x7f | 0x80)
  143. v >>= 7
  144. offset++
  145. }
  146. dAtA[offset] = uint8(v)
  147. return offset + 1
  148. }
  149. func (m *Info) Size() (n int) {
  150. var l int
  151. _ = l
  152. if m.Aid != 0 {
  153. n += 1 + sovModel(uint64(m.Aid))
  154. }
  155. if len(m.Cids) > 0 {
  156. l = 0
  157. for _, e := range m.Cids {
  158. l += sovModel(uint64(e))
  159. }
  160. n += 1 + sovModel(uint64(l)) + l
  161. }
  162. if m.State != 0 {
  163. n += 1 + sovModel(uint64(m.State))
  164. }
  165. if m.Mid != 0 {
  166. n += 1 + sovModel(uint64(m.Mid))
  167. }
  168. if m.Attribute != 0 {
  169. n += 1 + sovModel(uint64(m.Attribute))
  170. }
  171. return n
  172. }
  173. func sovModel(x uint64) (n int) {
  174. for {
  175. n++
  176. x >>= 7
  177. if x == 0 {
  178. break
  179. }
  180. }
  181. return n
  182. }
  183. func sozModel(x uint64) (n int) {
  184. return sovModel(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  185. }
  186. func (m *Info) Unmarshal(dAtA []byte) error {
  187. l := len(dAtA)
  188. iNdEx := 0
  189. for iNdEx < l {
  190. preIndex := iNdEx
  191. var wire uint64
  192. for shift := uint(0); ; shift += 7 {
  193. if shift >= 64 {
  194. return ErrIntOverflowModel
  195. }
  196. if iNdEx >= l {
  197. return io.ErrUnexpectedEOF
  198. }
  199. b := dAtA[iNdEx]
  200. iNdEx++
  201. wire |= (uint64(b) & 0x7F) << shift
  202. if b < 0x80 {
  203. break
  204. }
  205. }
  206. fieldNum := int32(wire >> 3)
  207. wireType := int(wire & 0x7)
  208. if wireType == 4 {
  209. return fmt.Errorf("proto: Info: wiretype end group for non-group")
  210. }
  211. if fieldNum <= 0 {
  212. return fmt.Errorf("proto: Info: illegal tag %d (wire type %d)", fieldNum, wire)
  213. }
  214. switch fieldNum {
  215. case 1:
  216. if wireType != 0 {
  217. return fmt.Errorf("proto: wrong wireType = %d for field Aid", wireType)
  218. }
  219. m.Aid = 0
  220. for shift := uint(0); ; shift += 7 {
  221. if shift >= 64 {
  222. return ErrIntOverflowModel
  223. }
  224. if iNdEx >= l {
  225. return io.ErrUnexpectedEOF
  226. }
  227. b := dAtA[iNdEx]
  228. iNdEx++
  229. m.Aid |= (int64(b) & 0x7F) << shift
  230. if b < 0x80 {
  231. break
  232. }
  233. }
  234. case 2:
  235. if wireType == 0 {
  236. var v int64
  237. for shift := uint(0); ; shift += 7 {
  238. if shift >= 64 {
  239. return ErrIntOverflowModel
  240. }
  241. if iNdEx >= l {
  242. return io.ErrUnexpectedEOF
  243. }
  244. b := dAtA[iNdEx]
  245. iNdEx++
  246. v |= (int64(b) & 0x7F) << shift
  247. if b < 0x80 {
  248. break
  249. }
  250. }
  251. m.Cids = append(m.Cids, v)
  252. } else if wireType == 2 {
  253. var packedLen int
  254. for shift := uint(0); ; shift += 7 {
  255. if shift >= 64 {
  256. return ErrIntOverflowModel
  257. }
  258. if iNdEx >= l {
  259. return io.ErrUnexpectedEOF
  260. }
  261. b := dAtA[iNdEx]
  262. iNdEx++
  263. packedLen |= (int(b) & 0x7F) << shift
  264. if b < 0x80 {
  265. break
  266. }
  267. }
  268. if packedLen < 0 {
  269. return ErrInvalidLengthModel
  270. }
  271. postIndex := iNdEx + packedLen
  272. if postIndex > l {
  273. return io.ErrUnexpectedEOF
  274. }
  275. for iNdEx < postIndex {
  276. var v int64
  277. for shift := uint(0); ; shift += 7 {
  278. if shift >= 64 {
  279. return ErrIntOverflowModel
  280. }
  281. if iNdEx >= l {
  282. return io.ErrUnexpectedEOF
  283. }
  284. b := dAtA[iNdEx]
  285. iNdEx++
  286. v |= (int64(b) & 0x7F) << shift
  287. if b < 0x80 {
  288. break
  289. }
  290. }
  291. m.Cids = append(m.Cids, v)
  292. }
  293. } else {
  294. return fmt.Errorf("proto: wrong wireType = %d for field Cids", wireType)
  295. }
  296. case 3:
  297. if wireType != 0 {
  298. return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
  299. }
  300. m.State = 0
  301. for shift := uint(0); ; shift += 7 {
  302. if shift >= 64 {
  303. return ErrIntOverflowModel
  304. }
  305. if iNdEx >= l {
  306. return io.ErrUnexpectedEOF
  307. }
  308. b := dAtA[iNdEx]
  309. iNdEx++
  310. m.State |= (int32(b) & 0x7F) << shift
  311. if b < 0x80 {
  312. break
  313. }
  314. }
  315. case 4:
  316. if wireType != 0 {
  317. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  318. }
  319. m.Mid = 0
  320. for shift := uint(0); ; shift += 7 {
  321. if shift >= 64 {
  322. return ErrIntOverflowModel
  323. }
  324. if iNdEx >= l {
  325. return io.ErrUnexpectedEOF
  326. }
  327. b := dAtA[iNdEx]
  328. iNdEx++
  329. m.Mid |= (int64(b) & 0x7F) << shift
  330. if b < 0x80 {
  331. break
  332. }
  333. }
  334. case 5:
  335. if wireType != 0 {
  336. return fmt.Errorf("proto: wrong wireType = %d for field Attribute", wireType)
  337. }
  338. m.Attribute = 0
  339. for shift := uint(0); ; shift += 7 {
  340. if shift >= 64 {
  341. return ErrIntOverflowModel
  342. }
  343. if iNdEx >= l {
  344. return io.ErrUnexpectedEOF
  345. }
  346. b := dAtA[iNdEx]
  347. iNdEx++
  348. m.Attribute |= (int32(b) & 0x7F) << shift
  349. if b < 0x80 {
  350. break
  351. }
  352. }
  353. default:
  354. iNdEx = preIndex
  355. skippy, err := skipModel(dAtA[iNdEx:])
  356. if err != nil {
  357. return err
  358. }
  359. if skippy < 0 {
  360. return ErrInvalidLengthModel
  361. }
  362. if (iNdEx + skippy) > l {
  363. return io.ErrUnexpectedEOF
  364. }
  365. iNdEx += skippy
  366. }
  367. }
  368. if iNdEx > l {
  369. return io.ErrUnexpectedEOF
  370. }
  371. return nil
  372. }
  373. func skipModel(dAtA []byte) (n int, err error) {
  374. l := len(dAtA)
  375. iNdEx := 0
  376. for iNdEx < l {
  377. var wire uint64
  378. for shift := uint(0); ; shift += 7 {
  379. if shift >= 64 {
  380. return 0, ErrIntOverflowModel
  381. }
  382. if iNdEx >= l {
  383. return 0, io.ErrUnexpectedEOF
  384. }
  385. b := dAtA[iNdEx]
  386. iNdEx++
  387. wire |= (uint64(b) & 0x7F) << shift
  388. if b < 0x80 {
  389. break
  390. }
  391. }
  392. wireType := int(wire & 0x7)
  393. switch wireType {
  394. case 0:
  395. for shift := uint(0); ; shift += 7 {
  396. if shift >= 64 {
  397. return 0, ErrIntOverflowModel
  398. }
  399. if iNdEx >= l {
  400. return 0, io.ErrUnexpectedEOF
  401. }
  402. iNdEx++
  403. if dAtA[iNdEx-1] < 0x80 {
  404. break
  405. }
  406. }
  407. return iNdEx, nil
  408. case 1:
  409. iNdEx += 8
  410. return iNdEx, nil
  411. case 2:
  412. var length int
  413. for shift := uint(0); ; shift += 7 {
  414. if shift >= 64 {
  415. return 0, ErrIntOverflowModel
  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. iNdEx += length
  428. if length < 0 {
  429. return 0, ErrInvalidLengthModel
  430. }
  431. return iNdEx, nil
  432. case 3:
  433. for {
  434. var innerWire uint64
  435. var start int = iNdEx
  436. for shift := uint(0); ; shift += 7 {
  437. if shift >= 64 {
  438. return 0, ErrIntOverflowModel
  439. }
  440. if iNdEx >= l {
  441. return 0, io.ErrUnexpectedEOF
  442. }
  443. b := dAtA[iNdEx]
  444. iNdEx++
  445. innerWire |= (uint64(b) & 0x7F) << shift
  446. if b < 0x80 {
  447. break
  448. }
  449. }
  450. innerWireType := int(innerWire & 0x7)
  451. if innerWireType == 4 {
  452. break
  453. }
  454. next, err := skipModel(dAtA[start:])
  455. if err != nil {
  456. return 0, err
  457. }
  458. iNdEx = start + next
  459. }
  460. return iNdEx, nil
  461. case 4:
  462. return iNdEx, nil
  463. case 5:
  464. iNdEx += 4
  465. return iNdEx, nil
  466. default:
  467. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  468. }
  469. }
  470. panic("unreachable")
  471. }
  472. var (
  473. ErrInvalidLengthModel = fmt.Errorf("proto: negative length found during unmarshaling")
  474. ErrIntOverflowModel = fmt.Errorf("proto: integer overflow")
  475. )
  476. func init() { proto.RegisterFile("model.proto", fileDescriptorModel) }
  477. var fileDescriptorModel = []byte{
  478. // 159 bytes of a gzipped FileDescriptorProto
  479. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0xcd, 0x4f, 0x49,
  480. 0xcd, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4f, 0x2c, 0x4a, 0xce, 0xc8, 0x2c, 0x4b,
  481. 0x55, 0x2a, 0xe2, 0x62, 0xf1, 0xcc, 0x4b, 0xcb, 0x17, 0x12, 0xe0, 0x62, 0x4e, 0xcc, 0x4c, 0x91,
  482. 0x60, 0x54, 0x60, 0xd4, 0x60, 0x0e, 0x02, 0x31, 0x85, 0x84, 0xb8, 0x58, 0x92, 0x33, 0x53, 0x8a,
  483. 0x25, 0x98, 0x14, 0x98, 0x35, 0x98, 0x83, 0xc0, 0x6c, 0x21, 0x11, 0x2e, 0xd6, 0xe2, 0x92, 0xc4,
  484. 0x92, 0x54, 0x09, 0x66, 0x05, 0x46, 0x0d, 0xd6, 0x20, 0x08, 0x07, 0xa4, 0x37, 0x37, 0x33, 0x45,
  485. 0x82, 0x05, 0xa2, 0x37, 0x37, 0x33, 0x45, 0x48, 0x86, 0x8b, 0x33, 0xb1, 0xa4, 0xa4, 0x28, 0x33,
  486. 0xa9, 0xb4, 0x24, 0x55, 0x82, 0x15, 0xac, 0x16, 0x21, 0xe0, 0x24, 0x70, 0xe2, 0x91, 0x1c, 0xe3,
  487. 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xce, 0x78, 0x2c, 0xc7, 0x90, 0xc4, 0x06, 0x76,
  488. 0x95, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xb5, 0xa1, 0xbc, 0xa4, 0x00, 0x00, 0x00,
  489. }