api.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: app/service/main/share/api/api.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 (
  9. context "golang.org/x/net/context"
  10. grpc "google.golang.org/grpc"
  11. )
  12. import io "io"
  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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  22. type AddShareRequest struct {
  23. Oid int64 `protobuf:"varint,1,opt,name=oid,proto3" json:"oid,omitempty"`
  24. Mid int64 `protobuf:"varint,2,opt,name=mid,proto3" json:"mid,omitempty"`
  25. Type int32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"`
  26. Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`
  27. }
  28. func (m *AddShareRequest) Reset() { *m = AddShareRequest{} }
  29. func (m *AddShareRequest) String() string { return proto.CompactTextString(m) }
  30. func (*AddShareRequest) ProtoMessage() {}
  31. func (*AddShareRequest) Descriptor() ([]byte, []int) {
  32. return fileDescriptor_api_84381552fbdb86d8, []int{0}
  33. }
  34. func (m *AddShareRequest) GetOid() int64 {
  35. if m != nil {
  36. return m.Oid
  37. }
  38. return 0
  39. }
  40. func (m *AddShareRequest) GetMid() int64 {
  41. if m != nil {
  42. return m.Mid
  43. }
  44. return 0
  45. }
  46. func (m *AddShareRequest) GetType() int32 {
  47. if m != nil {
  48. return m.Type
  49. }
  50. return 0
  51. }
  52. func (m *AddShareRequest) GetIp() string {
  53. if m != nil {
  54. return m.Ip
  55. }
  56. return ""
  57. }
  58. type AddShareReply struct {
  59. Shares int64 `protobuf:"varint,1,opt,name=shares,proto3" json:"shares,omitempty"`
  60. }
  61. func (m *AddShareReply) Reset() { *m = AddShareReply{} }
  62. func (m *AddShareReply) String() string { return proto.CompactTextString(m) }
  63. func (*AddShareReply) ProtoMessage() {}
  64. func (*AddShareReply) Descriptor() ([]byte, []int) {
  65. return fileDescriptor_api_84381552fbdb86d8, []int{1}
  66. }
  67. func (m *AddShareReply) GetShares() int64 {
  68. if m != nil {
  69. return m.Shares
  70. }
  71. return 0
  72. }
  73. func init() {
  74. proto.RegisterType((*AddShareRequest)(nil), "share.service.v1.AddShareRequest")
  75. proto.RegisterType((*AddShareReply)(nil), "share.service.v1.AddShareReply")
  76. }
  77. // Reference imports to suppress errors if they are not otherwise used.
  78. var _ context.Context
  79. var _ grpc.ClientConn
  80. // This is a compile-time assertion to ensure that this generated file
  81. // is compatible with the grpc package it is being compiled against.
  82. const _ = grpc.SupportPackageIsVersion4
  83. // ShareClient is the client API for Share service.
  84. //
  85. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  86. type ShareClient interface {
  87. AddShare(ctx context.Context, in *AddShareRequest, opts ...grpc.CallOption) (*AddShareReply, error)
  88. }
  89. type shareClient struct {
  90. cc *grpc.ClientConn
  91. }
  92. func NewShareClient(cc *grpc.ClientConn) ShareClient {
  93. return &shareClient{cc}
  94. }
  95. func (c *shareClient) AddShare(ctx context.Context, in *AddShareRequest, opts ...grpc.CallOption) (*AddShareReply, error) {
  96. out := new(AddShareReply)
  97. err := c.cc.Invoke(ctx, "/share.service.v1.Share/AddShare", in, out, opts...)
  98. if err != nil {
  99. return nil, err
  100. }
  101. return out, nil
  102. }
  103. // ShareServer is the server API for Share service.
  104. type ShareServer interface {
  105. AddShare(context.Context, *AddShareRequest) (*AddShareReply, error)
  106. }
  107. func RegisterShareServer(s *grpc.Server, srv ShareServer) {
  108. s.RegisterService(&_Share_serviceDesc, srv)
  109. }
  110. func _Share_AddShare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  111. in := new(AddShareRequest)
  112. if err := dec(in); err != nil {
  113. return nil, err
  114. }
  115. if interceptor == nil {
  116. return srv.(ShareServer).AddShare(ctx, in)
  117. }
  118. info := &grpc.UnaryServerInfo{
  119. Server: srv,
  120. FullMethod: "/share.service.v1.Share/AddShare",
  121. }
  122. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  123. return srv.(ShareServer).AddShare(ctx, req.(*AddShareRequest))
  124. }
  125. return interceptor(ctx, in, info, handler)
  126. }
  127. var _Share_serviceDesc = grpc.ServiceDesc{
  128. ServiceName: "share.service.v1.Share",
  129. HandlerType: (*ShareServer)(nil),
  130. Methods: []grpc.MethodDesc{
  131. {
  132. MethodName: "AddShare",
  133. Handler: _Share_AddShare_Handler,
  134. },
  135. },
  136. Streams: []grpc.StreamDesc{},
  137. Metadata: "app/service/main/share/api/api.proto",
  138. }
  139. func (m *AddShareRequest) Marshal() (dAtA []byte, err error) {
  140. size := m.Size()
  141. dAtA = make([]byte, size)
  142. n, err := m.MarshalTo(dAtA)
  143. if err != nil {
  144. return nil, err
  145. }
  146. return dAtA[:n], nil
  147. }
  148. func (m *AddShareRequest) MarshalTo(dAtA []byte) (int, error) {
  149. var i int
  150. _ = i
  151. var l int
  152. _ = l
  153. if m.Oid != 0 {
  154. dAtA[i] = 0x8
  155. i++
  156. i = encodeVarintApi(dAtA, i, uint64(m.Oid))
  157. }
  158. if m.Mid != 0 {
  159. dAtA[i] = 0x10
  160. i++
  161. i = encodeVarintApi(dAtA, i, uint64(m.Mid))
  162. }
  163. if m.Type != 0 {
  164. dAtA[i] = 0x18
  165. i++
  166. i = encodeVarintApi(dAtA, i, uint64(m.Type))
  167. }
  168. if len(m.Ip) > 0 {
  169. dAtA[i] = 0x22
  170. i++
  171. i = encodeVarintApi(dAtA, i, uint64(len(m.Ip)))
  172. i += copy(dAtA[i:], m.Ip)
  173. }
  174. return i, nil
  175. }
  176. func (m *AddShareReply) Marshal() (dAtA []byte, err error) {
  177. size := m.Size()
  178. dAtA = make([]byte, size)
  179. n, err := m.MarshalTo(dAtA)
  180. if err != nil {
  181. return nil, err
  182. }
  183. return dAtA[:n], nil
  184. }
  185. func (m *AddShareReply) MarshalTo(dAtA []byte) (int, error) {
  186. var i int
  187. _ = i
  188. var l int
  189. _ = l
  190. if m.Shares != 0 {
  191. dAtA[i] = 0x8
  192. i++
  193. i = encodeVarintApi(dAtA, i, uint64(m.Shares))
  194. }
  195. return i, nil
  196. }
  197. func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
  198. for v >= 1<<7 {
  199. dAtA[offset] = uint8(v&0x7f | 0x80)
  200. v >>= 7
  201. offset++
  202. }
  203. dAtA[offset] = uint8(v)
  204. return offset + 1
  205. }
  206. func (m *AddShareRequest) Size() (n int) {
  207. if m == nil {
  208. return 0
  209. }
  210. var l int
  211. _ = l
  212. if m.Oid != 0 {
  213. n += 1 + sovApi(uint64(m.Oid))
  214. }
  215. if m.Mid != 0 {
  216. n += 1 + sovApi(uint64(m.Mid))
  217. }
  218. if m.Type != 0 {
  219. n += 1 + sovApi(uint64(m.Type))
  220. }
  221. l = len(m.Ip)
  222. if l > 0 {
  223. n += 1 + l + sovApi(uint64(l))
  224. }
  225. return n
  226. }
  227. func (m *AddShareReply) Size() (n int) {
  228. if m == nil {
  229. return 0
  230. }
  231. var l int
  232. _ = l
  233. if m.Shares != 0 {
  234. n += 1 + sovApi(uint64(m.Shares))
  235. }
  236. return n
  237. }
  238. func sovApi(x uint64) (n int) {
  239. for {
  240. n++
  241. x >>= 7
  242. if x == 0 {
  243. break
  244. }
  245. }
  246. return n
  247. }
  248. func sozApi(x uint64) (n int) {
  249. return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  250. }
  251. func (m *AddShareRequest) Unmarshal(dAtA []byte) error {
  252. l := len(dAtA)
  253. iNdEx := 0
  254. for iNdEx < l {
  255. preIndex := iNdEx
  256. var wire uint64
  257. for shift := uint(0); ; shift += 7 {
  258. if shift >= 64 {
  259. return ErrIntOverflowApi
  260. }
  261. if iNdEx >= l {
  262. return io.ErrUnexpectedEOF
  263. }
  264. b := dAtA[iNdEx]
  265. iNdEx++
  266. wire |= (uint64(b) & 0x7F) << shift
  267. if b < 0x80 {
  268. break
  269. }
  270. }
  271. fieldNum := int32(wire >> 3)
  272. wireType := int(wire & 0x7)
  273. if wireType == 4 {
  274. return fmt.Errorf("proto: AddShareRequest: wiretype end group for non-group")
  275. }
  276. if fieldNum <= 0 {
  277. return fmt.Errorf("proto: AddShareRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  278. }
  279. switch fieldNum {
  280. case 1:
  281. if wireType != 0 {
  282. return fmt.Errorf("proto: wrong wireType = %d for field Oid", wireType)
  283. }
  284. m.Oid = 0
  285. for shift := uint(0); ; shift += 7 {
  286. if shift >= 64 {
  287. return ErrIntOverflowApi
  288. }
  289. if iNdEx >= l {
  290. return io.ErrUnexpectedEOF
  291. }
  292. b := dAtA[iNdEx]
  293. iNdEx++
  294. m.Oid |= (int64(b) & 0x7F) << shift
  295. if b < 0x80 {
  296. break
  297. }
  298. }
  299. case 2:
  300. if wireType != 0 {
  301. return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
  302. }
  303. m.Mid = 0
  304. for shift := uint(0); ; shift += 7 {
  305. if shift >= 64 {
  306. return ErrIntOverflowApi
  307. }
  308. if iNdEx >= l {
  309. return io.ErrUnexpectedEOF
  310. }
  311. b := dAtA[iNdEx]
  312. iNdEx++
  313. m.Mid |= (int64(b) & 0x7F) << shift
  314. if b < 0x80 {
  315. break
  316. }
  317. }
  318. case 3:
  319. if wireType != 0 {
  320. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  321. }
  322. m.Type = 0
  323. for shift := uint(0); ; shift += 7 {
  324. if shift >= 64 {
  325. return ErrIntOverflowApi
  326. }
  327. if iNdEx >= l {
  328. return io.ErrUnexpectedEOF
  329. }
  330. b := dAtA[iNdEx]
  331. iNdEx++
  332. m.Type |= (int32(b) & 0x7F) << shift
  333. if b < 0x80 {
  334. break
  335. }
  336. }
  337. case 4:
  338. if wireType != 2 {
  339. return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType)
  340. }
  341. var stringLen uint64
  342. for shift := uint(0); ; shift += 7 {
  343. if shift >= 64 {
  344. return ErrIntOverflowApi
  345. }
  346. if iNdEx >= l {
  347. return io.ErrUnexpectedEOF
  348. }
  349. b := dAtA[iNdEx]
  350. iNdEx++
  351. stringLen |= (uint64(b) & 0x7F) << shift
  352. if b < 0x80 {
  353. break
  354. }
  355. }
  356. intStringLen := int(stringLen)
  357. if intStringLen < 0 {
  358. return ErrInvalidLengthApi
  359. }
  360. postIndex := iNdEx + intStringLen
  361. if postIndex > l {
  362. return io.ErrUnexpectedEOF
  363. }
  364. m.Ip = string(dAtA[iNdEx:postIndex])
  365. iNdEx = postIndex
  366. default:
  367. iNdEx = preIndex
  368. skippy, err := skipApi(dAtA[iNdEx:])
  369. if err != nil {
  370. return err
  371. }
  372. if skippy < 0 {
  373. return ErrInvalidLengthApi
  374. }
  375. if (iNdEx + skippy) > l {
  376. return io.ErrUnexpectedEOF
  377. }
  378. iNdEx += skippy
  379. }
  380. }
  381. if iNdEx > l {
  382. return io.ErrUnexpectedEOF
  383. }
  384. return nil
  385. }
  386. func (m *AddShareReply) Unmarshal(dAtA []byte) error {
  387. l := len(dAtA)
  388. iNdEx := 0
  389. for iNdEx < l {
  390. preIndex := iNdEx
  391. var wire uint64
  392. for shift := uint(0); ; shift += 7 {
  393. if shift >= 64 {
  394. return ErrIntOverflowApi
  395. }
  396. if iNdEx >= l {
  397. return io.ErrUnexpectedEOF
  398. }
  399. b := dAtA[iNdEx]
  400. iNdEx++
  401. wire |= (uint64(b) & 0x7F) << shift
  402. if b < 0x80 {
  403. break
  404. }
  405. }
  406. fieldNum := int32(wire >> 3)
  407. wireType := int(wire & 0x7)
  408. if wireType == 4 {
  409. return fmt.Errorf("proto: AddShareReply: wiretype end group for non-group")
  410. }
  411. if fieldNum <= 0 {
  412. return fmt.Errorf("proto: AddShareReply: illegal tag %d (wire type %d)", fieldNum, wire)
  413. }
  414. switch fieldNum {
  415. case 1:
  416. if wireType != 0 {
  417. return fmt.Errorf("proto: wrong wireType = %d for field Shares", wireType)
  418. }
  419. m.Shares = 0
  420. for shift := uint(0); ; shift += 7 {
  421. if shift >= 64 {
  422. return ErrIntOverflowApi
  423. }
  424. if iNdEx >= l {
  425. return io.ErrUnexpectedEOF
  426. }
  427. b := dAtA[iNdEx]
  428. iNdEx++
  429. m.Shares |= (int64(b) & 0x7F) << shift
  430. if b < 0x80 {
  431. break
  432. }
  433. }
  434. default:
  435. iNdEx = preIndex
  436. skippy, err := skipApi(dAtA[iNdEx:])
  437. if err != nil {
  438. return err
  439. }
  440. if skippy < 0 {
  441. return ErrInvalidLengthApi
  442. }
  443. if (iNdEx + skippy) > l {
  444. return io.ErrUnexpectedEOF
  445. }
  446. iNdEx += skippy
  447. }
  448. }
  449. if iNdEx > l {
  450. return io.ErrUnexpectedEOF
  451. }
  452. return nil
  453. }
  454. func skipApi(dAtA []byte) (n int, err error) {
  455. l := len(dAtA)
  456. iNdEx := 0
  457. for iNdEx < l {
  458. var wire uint64
  459. for shift := uint(0); ; shift += 7 {
  460. if shift >= 64 {
  461. return 0, ErrIntOverflowApi
  462. }
  463. if iNdEx >= l {
  464. return 0, io.ErrUnexpectedEOF
  465. }
  466. b := dAtA[iNdEx]
  467. iNdEx++
  468. wire |= (uint64(b) & 0x7F) << shift
  469. if b < 0x80 {
  470. break
  471. }
  472. }
  473. wireType := int(wire & 0x7)
  474. switch wireType {
  475. case 0:
  476. for shift := uint(0); ; shift += 7 {
  477. if shift >= 64 {
  478. return 0, ErrIntOverflowApi
  479. }
  480. if iNdEx >= l {
  481. return 0, io.ErrUnexpectedEOF
  482. }
  483. iNdEx++
  484. if dAtA[iNdEx-1] < 0x80 {
  485. break
  486. }
  487. }
  488. return iNdEx, nil
  489. case 1:
  490. iNdEx += 8
  491. return iNdEx, nil
  492. case 2:
  493. var length int
  494. for shift := uint(0); ; shift += 7 {
  495. if shift >= 64 {
  496. return 0, ErrIntOverflowApi
  497. }
  498. if iNdEx >= l {
  499. return 0, io.ErrUnexpectedEOF
  500. }
  501. b := dAtA[iNdEx]
  502. iNdEx++
  503. length |= (int(b) & 0x7F) << shift
  504. if b < 0x80 {
  505. break
  506. }
  507. }
  508. iNdEx += length
  509. if length < 0 {
  510. return 0, ErrInvalidLengthApi
  511. }
  512. return iNdEx, nil
  513. case 3:
  514. for {
  515. var innerWire uint64
  516. var start int = iNdEx
  517. for shift := uint(0); ; shift += 7 {
  518. if shift >= 64 {
  519. return 0, ErrIntOverflowApi
  520. }
  521. if iNdEx >= l {
  522. return 0, io.ErrUnexpectedEOF
  523. }
  524. b := dAtA[iNdEx]
  525. iNdEx++
  526. innerWire |= (uint64(b) & 0x7F) << shift
  527. if b < 0x80 {
  528. break
  529. }
  530. }
  531. innerWireType := int(innerWire & 0x7)
  532. if innerWireType == 4 {
  533. break
  534. }
  535. next, err := skipApi(dAtA[start:])
  536. if err != nil {
  537. return 0, err
  538. }
  539. iNdEx = start + next
  540. }
  541. return iNdEx, nil
  542. case 4:
  543. return iNdEx, nil
  544. case 5:
  545. iNdEx += 4
  546. return iNdEx, nil
  547. default:
  548. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  549. }
  550. }
  551. panic("unreachable")
  552. }
  553. var (
  554. ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
  555. ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
  556. )
  557. func init() {
  558. proto.RegisterFile("app/service/main/share/api/api.proto", fileDescriptor_api_84381552fbdb86d8)
  559. }
  560. var fileDescriptor_api_84381552fbdb86d8 = []byte{
  561. // 256 bytes of a gzipped FileDescriptorProto
  562. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x8f, 0x4b, 0x4a, 0xc4, 0x40,
  563. 0x10, 0x86, 0xe9, 0x64, 0x66, 0xd0, 0x02, 0x35, 0xf4, 0x42, 0xc2, 0x2c, 0x62, 0x9c, 0x8d, 0x59,
  564. 0x68, 0x37, 0xd1, 0x13, 0xe8, 0x01, 0x5c, 0xc4, 0x85, 0xe8, 0x2e, 0x8f, 0x36, 0x53, 0x30, 0xb1,
  565. 0xcb, 0xbc, 0x20, 0x37, 0x74, 0xe9, 0x11, 0x24, 0x27, 0x91, 0xd4, 0x44, 0x84, 0x59, 0xb8, 0xfb,
  566. 0xff, 0xea, 0xaf, 0x3f, 0xaa, 0xe0, 0x3a, 0x25, 0xd2, 0x8d, 0xa9, 0x7b, 0xcc, 0x8d, 0xae, 0x52,
  567. 0x7c, 0xd7, 0xcd, 0x36, 0xad, 0x8d, 0x4e, 0x09, 0x75, 0x59, 0x53, 0xae, 0xfb, 0x78, 0xca, 0x8a,
  568. 0x6a, 0xdb, 0x5a, 0xe9, 0xf1, 0xa3, 0x9a, 0x79, 0xd5, 0xc7, 0xeb, 0x9b, 0x12, 0xdb, 0x6d, 0x97,
  569. 0xa9, 0xdc, 0x56, 0xba, 0xb4, 0xa5, 0xd5, 0x0c, 0x66, 0xdd, 0x1b, 0x37, 0x2e, 0x9c, 0xf6, 0x82,
  570. 0xcd, 0x0b, 0x9c, 0xdd, 0x17, 0xc5, 0xd3, 0x64, 0x49, 0xcc, 0x47, 0x67, 0x9a, 0x56, 0x7a, 0xe0,
  571. 0x5a, 0x2c, 0x7c, 0x11, 0x8a, 0xc8, 0x4d, 0xa6, 0x38, 0x4d, 0x2a, 0x2c, 0x7c, 0x67, 0x3f, 0xa9,
  572. 0xb0, 0x90, 0x12, 0x16, 0xed, 0x40, 0xc6, 0x77, 0x43, 0x11, 0x2d, 0x13, 0xce, 0xf2, 0x14, 0x1c,
  573. 0x24, 0x7f, 0x11, 0x8a, 0xe8, 0x38, 0x71, 0x90, 0x36, 0x57, 0x70, 0xf2, 0xa7, 0xa6, 0xdd, 0x20,
  574. 0xcf, 0x61, 0xc5, 0xeb, 0x36, 0xb3, 0x7b, 0x6e, 0xb7, 0xcf, 0xb0, 0x64, 0x4a, 0x3e, 0xc2, 0xd1,
  575. 0xef, 0x0f, 0x79, 0xa9, 0x0e, 0x4f, 0x53, 0x07, 0x8b, 0xae, 0x2f, 0xfe, 0x43, 0x68, 0x37, 0x3c,
  576. 0x78, 0x9f, 0x63, 0x20, 0xbe, 0xc6, 0x40, 0x7c, 0x8f, 0x81, 0x78, 0x75, 0xfa, 0x38, 0x5b, 0xf1,
  577. 0xd5, 0x77, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x7c, 0x30, 0x07, 0x66, 0x01, 0x00, 0x00,
  578. }