archive.pb.go 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: app/service/main/up/api/v1/archive.proto
  3. package v1
  4. import proto "github.com/gogo/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import _ "github.com/gogo/protobuf/gogoproto"
  8. import go_common_library_time "go-common/library/time"
  9. import io "io"
  10. // Reference imports to suppress errors if they are not otherwise used.
  11. var _ = proto.Marshal
  12. var _ = fmt.Errorf
  13. var _ = math.Inf
  14. // AidPubTime 发布时间的稿件aid的信息
  15. type AidPubTime struct {
  16. // aid 稿件aid
  17. Aid int64 `protobuf:"varint,1,opt,name=aid,proto3" json:"aid"`
  18. // pub_date 发布时间
  19. PubDate go_common_library_time.Time `protobuf:"varint,2,opt,name=pub_date,json=pubDate,proto3,casttype=go-common/library/time.Time" json:"pubdate"`
  20. // copyright 版权来源
  21. Copyright int32 `protobuf:"varint,3,opt,name=copyright,proto3" json:"copyright"`
  22. }
  23. func (m *AidPubTime) Reset() { *m = AidPubTime{} }
  24. func (m *AidPubTime) String() string { return proto.CompactTextString(m) }
  25. func (*AidPubTime) ProtoMessage() {}
  26. func (*AidPubTime) Descriptor() ([]byte, []int) { return fileDescriptorArchive, []int{0} }
  27. func (m *AidPubTime) GetAid() int64 {
  28. if m != nil {
  29. return m.Aid
  30. }
  31. return 0
  32. }
  33. func (m *AidPubTime) GetPubDate() go_common_library_time.Time {
  34. if m != nil {
  35. return m.PubDate
  36. }
  37. return 0
  38. }
  39. func (m *AidPubTime) GetCopyright() int32 {
  40. if m != nil {
  41. return m.Copyright
  42. }
  43. return 0
  44. }
  45. func init() {
  46. proto.RegisterType((*AidPubTime)(nil), "archive.service.up.v1.AidPubTime")
  47. }
  48. func (m *AidPubTime) Marshal() (dAtA []byte, err error) {
  49. size := m.Size()
  50. dAtA = make([]byte, size)
  51. n, err := m.MarshalTo(dAtA)
  52. if err != nil {
  53. return nil, err
  54. }
  55. return dAtA[:n], nil
  56. }
  57. func (m *AidPubTime) MarshalTo(dAtA []byte) (int, error) {
  58. var i int
  59. _ = i
  60. var l int
  61. _ = l
  62. if m.Aid != 0 {
  63. dAtA[i] = 0x8
  64. i++
  65. i = encodeVarintArchive(dAtA, i, uint64(m.Aid))
  66. }
  67. if m.PubDate != 0 {
  68. dAtA[i] = 0x10
  69. i++
  70. i = encodeVarintArchive(dAtA, i, uint64(m.PubDate))
  71. }
  72. if m.Copyright != 0 {
  73. dAtA[i] = 0x18
  74. i++
  75. i = encodeVarintArchive(dAtA, i, uint64(m.Copyright))
  76. }
  77. return i, nil
  78. }
  79. func encodeVarintArchive(dAtA []byte, offset int, v uint64) int {
  80. for v >= 1<<7 {
  81. dAtA[offset] = uint8(v&0x7f | 0x80)
  82. v >>= 7
  83. offset++
  84. }
  85. dAtA[offset] = uint8(v)
  86. return offset + 1
  87. }
  88. func (m *AidPubTime) Size() (n int) {
  89. var l int
  90. _ = l
  91. if m.Aid != 0 {
  92. n += 1 + sovArchive(uint64(m.Aid))
  93. }
  94. if m.PubDate != 0 {
  95. n += 1 + sovArchive(uint64(m.PubDate))
  96. }
  97. if m.Copyright != 0 {
  98. n += 1 + sovArchive(uint64(m.Copyright))
  99. }
  100. return n
  101. }
  102. func sovArchive(x uint64) (n int) {
  103. for {
  104. n++
  105. x >>= 7
  106. if x == 0 {
  107. break
  108. }
  109. }
  110. return n
  111. }
  112. func sozArchive(x uint64) (n int) {
  113. return sovArchive(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  114. }
  115. func (m *AidPubTime) Unmarshal(dAtA []byte) error {
  116. l := len(dAtA)
  117. iNdEx := 0
  118. for iNdEx < l {
  119. preIndex := iNdEx
  120. var wire uint64
  121. for shift := uint(0); ; shift += 7 {
  122. if shift >= 64 {
  123. return ErrIntOverflowArchive
  124. }
  125. if iNdEx >= l {
  126. return io.ErrUnexpectedEOF
  127. }
  128. b := dAtA[iNdEx]
  129. iNdEx++
  130. wire |= (uint64(b) & 0x7F) << shift
  131. if b < 0x80 {
  132. break
  133. }
  134. }
  135. fieldNum := int32(wire >> 3)
  136. wireType := int(wire & 0x7)
  137. if wireType == 4 {
  138. return fmt.Errorf("proto: AidPubTime: wiretype end group for non-group")
  139. }
  140. if fieldNum <= 0 {
  141. return fmt.Errorf("proto: AidPubTime: illegal tag %d (wire type %d)", fieldNum, wire)
  142. }
  143. switch fieldNum {
  144. case 1:
  145. if wireType != 0 {
  146. return fmt.Errorf("proto: wrong wireType = %d for field Aid", wireType)
  147. }
  148. m.Aid = 0
  149. for shift := uint(0); ; shift += 7 {
  150. if shift >= 64 {
  151. return ErrIntOverflowArchive
  152. }
  153. if iNdEx >= l {
  154. return io.ErrUnexpectedEOF
  155. }
  156. b := dAtA[iNdEx]
  157. iNdEx++
  158. m.Aid |= (int64(b) & 0x7F) << shift
  159. if b < 0x80 {
  160. break
  161. }
  162. }
  163. case 2:
  164. if wireType != 0 {
  165. return fmt.Errorf("proto: wrong wireType = %d for field PubDate", wireType)
  166. }
  167. m.PubDate = 0
  168. for shift := uint(0); ; shift += 7 {
  169. if shift >= 64 {
  170. return ErrIntOverflowArchive
  171. }
  172. if iNdEx >= l {
  173. return io.ErrUnexpectedEOF
  174. }
  175. b := dAtA[iNdEx]
  176. iNdEx++
  177. m.PubDate |= (go_common_library_time.Time(b) & 0x7F) << shift
  178. if b < 0x80 {
  179. break
  180. }
  181. }
  182. case 3:
  183. if wireType != 0 {
  184. return fmt.Errorf("proto: wrong wireType = %d for field Copyright", wireType)
  185. }
  186. m.Copyright = 0
  187. for shift := uint(0); ; shift += 7 {
  188. if shift >= 64 {
  189. return ErrIntOverflowArchive
  190. }
  191. if iNdEx >= l {
  192. return io.ErrUnexpectedEOF
  193. }
  194. b := dAtA[iNdEx]
  195. iNdEx++
  196. m.Copyright |= (int32(b) & 0x7F) << shift
  197. if b < 0x80 {
  198. break
  199. }
  200. }
  201. default:
  202. iNdEx = preIndex
  203. skippy, err := skipArchive(dAtA[iNdEx:])
  204. if err != nil {
  205. return err
  206. }
  207. if skippy < 0 {
  208. return ErrInvalidLengthArchive
  209. }
  210. if (iNdEx + skippy) > l {
  211. return io.ErrUnexpectedEOF
  212. }
  213. iNdEx += skippy
  214. }
  215. }
  216. if iNdEx > l {
  217. return io.ErrUnexpectedEOF
  218. }
  219. return nil
  220. }
  221. func skipArchive(dAtA []byte) (n int, err error) {
  222. l := len(dAtA)
  223. iNdEx := 0
  224. for iNdEx < l {
  225. var wire uint64
  226. for shift := uint(0); ; shift += 7 {
  227. if shift >= 64 {
  228. return 0, ErrIntOverflowArchive
  229. }
  230. if iNdEx >= l {
  231. return 0, io.ErrUnexpectedEOF
  232. }
  233. b := dAtA[iNdEx]
  234. iNdEx++
  235. wire |= (uint64(b) & 0x7F) << shift
  236. if b < 0x80 {
  237. break
  238. }
  239. }
  240. wireType := int(wire & 0x7)
  241. switch wireType {
  242. case 0:
  243. for shift := uint(0); ; shift += 7 {
  244. if shift >= 64 {
  245. return 0, ErrIntOverflowArchive
  246. }
  247. if iNdEx >= l {
  248. return 0, io.ErrUnexpectedEOF
  249. }
  250. iNdEx++
  251. if dAtA[iNdEx-1] < 0x80 {
  252. break
  253. }
  254. }
  255. return iNdEx, nil
  256. case 1:
  257. iNdEx += 8
  258. return iNdEx, nil
  259. case 2:
  260. var length int
  261. for shift := uint(0); ; shift += 7 {
  262. if shift >= 64 {
  263. return 0, ErrIntOverflowArchive
  264. }
  265. if iNdEx >= l {
  266. return 0, io.ErrUnexpectedEOF
  267. }
  268. b := dAtA[iNdEx]
  269. iNdEx++
  270. length |= (int(b) & 0x7F) << shift
  271. if b < 0x80 {
  272. break
  273. }
  274. }
  275. iNdEx += length
  276. if length < 0 {
  277. return 0, ErrInvalidLengthArchive
  278. }
  279. return iNdEx, nil
  280. case 3:
  281. for {
  282. var innerWire uint64
  283. var start int = iNdEx
  284. for shift := uint(0); ; shift += 7 {
  285. if shift >= 64 {
  286. return 0, ErrIntOverflowArchive
  287. }
  288. if iNdEx >= l {
  289. return 0, io.ErrUnexpectedEOF
  290. }
  291. b := dAtA[iNdEx]
  292. iNdEx++
  293. innerWire |= (uint64(b) & 0x7F) << shift
  294. if b < 0x80 {
  295. break
  296. }
  297. }
  298. innerWireType := int(innerWire & 0x7)
  299. if innerWireType == 4 {
  300. break
  301. }
  302. next, err := skipArchive(dAtA[start:])
  303. if err != nil {
  304. return 0, err
  305. }
  306. iNdEx = start + next
  307. }
  308. return iNdEx, nil
  309. case 4:
  310. return iNdEx, nil
  311. case 5:
  312. iNdEx += 4
  313. return iNdEx, nil
  314. default:
  315. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  316. }
  317. }
  318. panic("unreachable")
  319. }
  320. var (
  321. ErrInvalidLengthArchive = fmt.Errorf("proto: negative length found during unmarshaling")
  322. ErrIntOverflowArchive = fmt.Errorf("proto: integer overflow")
  323. )
  324. func init() { proto.RegisterFile("app/service/main/up/api/v1/archive.proto", fileDescriptorArchive) }
  325. var fileDescriptorArchive = []byte{
  326. // 255 bytes of a gzipped FileDescriptorProto
  327. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x8e, 0x41, 0x4a, 0xc4, 0x30,
  328. 0x14, 0x86, 0xc9, 0x14, 0x1d, 0x0d, 0x08, 0x52, 0x10, 0xaa, 0x42, 0x3b, 0xb8, 0x2a, 0xca, 0xf4,
  329. 0x51, 0x3c, 0x81, 0x45, 0xf7, 0x52, 0x5c, 0xb9, 0x91, 0xa4, 0x8d, 0xed, 0x03, 0x33, 0x09, 0x31,
  330. 0x29, 0xcc, 0x59, 0xbc, 0x90, 0x4b, 0x4f, 0x50, 0xa4, 0xcb, 0x1e, 0xc1, 0x95, 0x24, 0x3a, 0xcc,
  331. 0x26, 0xfc, 0xdf, 0x9f, 0x8f, 0x9f, 0x47, 0x73, 0xa6, 0x35, 0xbc, 0x0b, 0x33, 0x60, 0x23, 0x40,
  332. 0x32, 0xdc, 0x80, 0xd3, 0xc0, 0x34, 0xc2, 0x50, 0x02, 0x33, 0x4d, 0x8f, 0x83, 0x28, 0xb4, 0x51,
  333. 0x56, 0xc5, 0x67, 0x3b, 0xfc, 0xb7, 0x0b, 0xa7, 0x8b, 0xa1, 0xbc, 0x58, 0x77, 0x68, 0x7b, 0xc7,
  334. 0x8b, 0x46, 0x49, 0xe8, 0x54, 0xa7, 0x20, 0xd8, 0xdc, 0xbd, 0x06, 0x0a, 0x10, 0xd2, 0xdf, 0xca,
  335. 0xd5, 0x07, 0xa1, 0xf4, 0x0e, 0xdb, 0x47, 0xc7, 0x9f, 0x50, 0x8a, 0xf8, 0x9c, 0x46, 0x0c, 0xdb,
  336. 0x84, 0xac, 0x48, 0x1e, 0x55, 0xcb, 0x79, 0xcc, 0x3c, 0xd6, 0xfe, 0x89, 0x1f, 0xe8, 0x91, 0x76,
  337. 0xfc, 0xa5, 0x65, 0x56, 0x24, 0x8b, 0xf0, 0x7f, 0x3d, 0x8f, 0xd9, 0x52, 0x3b, 0xee, 0xab, 0x9f,
  338. 0x31, 0xbb, 0xec, 0xd4, 0xba, 0x51, 0x52, 0xaa, 0x0d, 0xbc, 0x21, 0x37, 0xcc, 0x6c, 0xc1, 0xa2,
  339. 0x14, 0x85, 0x1f, 0xae, 0xbd, 0x77, 0xcf, 0xac, 0x88, 0x6f, 0xe8, 0x71, 0xa3, 0xf4, 0xd6, 0x60,
  340. 0xd7, 0xdb, 0x24, 0x5a, 0x91, 0xfc, 0xa0, 0x3a, 0x99, 0xc7, 0x6c, 0x5f, 0xd6, 0xfb, 0x58, 0x9d,
  341. 0x7e, 0x4e, 0x29, 0xf9, 0x9a, 0x52, 0xf2, 0x3d, 0xa5, 0xe4, 0x79, 0x31, 0x94, 0xfc, 0x30, 0x9c,
  342. 0x7d, 0xfb, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x8d, 0xf9, 0xfe, 0x1f, 0x28, 0x01, 0x00, 0x00,
  343. }