pay.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: app/service/openplatform/ticket-sales/api/grpc/v1/pay.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 context "golang.org/x/net/context"
  9. import grpc "google.golang.org/grpc"
  10. import strings "strings"
  11. import reflect "reflect"
  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. type PayNotifyRequest struct {
  18. MsgID string `protobuf:"bytes,1,opt,name=msgID,proto3" json:"msgID,omitempty"`
  19. MsgContent string `protobuf:"bytes,2,opt,name=msgContent,proto3" json:"msgContent,omitempty"`
  20. TestMode bool `protobuf:"varint,3,opt,name=testMode,proto3" json:"testMode,omitempty"`
  21. }
  22. func (m *PayNotifyRequest) Reset() { *m = PayNotifyRequest{} }
  23. func (*PayNotifyRequest) ProtoMessage() {}
  24. func (*PayNotifyRequest) Descriptor() ([]byte, []int) { return fileDescriptorPay, []int{0} }
  25. type PayNotifyResponse struct {
  26. }
  27. func (m *PayNotifyResponse) Reset() { *m = PayNotifyResponse{} }
  28. func (*PayNotifyResponse) ProtoMessage() {}
  29. func (*PayNotifyResponse) Descriptor() ([]byte, []int) { return fileDescriptorPay, []int{1} }
  30. func init() {
  31. proto.RegisterType((*PayNotifyRequest)(nil), "ticket.service.sales.v1.PayNotifyRequest")
  32. proto.RegisterType((*PayNotifyResponse)(nil), "ticket.service.sales.v1.PayNotifyResponse")
  33. }
  34. // Reference imports to suppress errors if they are not otherwise used.
  35. var _ context.Context
  36. var _ grpc.ClientConn
  37. // This is a compile-time assertion to ensure that this generated file
  38. // is compatible with the grpc package it is being compiled against.
  39. const _ = grpc.SupportPackageIsVersion4
  40. // Client API for Pay service
  41. type PayClient interface {
  42. PayNotify(ctx context.Context, in *PayNotifyRequest, opts ...grpc.CallOption) (*PayNotifyResponse, error)
  43. }
  44. type payClient struct {
  45. cc *grpc.ClientConn
  46. }
  47. func NewPayClient(cc *grpc.ClientConn) PayClient {
  48. return &payClient{cc}
  49. }
  50. func (c *payClient) PayNotify(ctx context.Context, in *PayNotifyRequest, opts ...grpc.CallOption) (*PayNotifyResponse, error) {
  51. out := new(PayNotifyResponse)
  52. err := grpc.Invoke(ctx, "/ticket.service.sales.v1.Pay/PayNotify", in, out, c.cc, opts...)
  53. if err != nil {
  54. return nil, err
  55. }
  56. return out, nil
  57. }
  58. // Server API for Pay service
  59. type PayServer interface {
  60. PayNotify(context.Context, *PayNotifyRequest) (*PayNotifyResponse, error)
  61. }
  62. func RegisterPayServer(s *grpc.Server, srv PayServer) {
  63. s.RegisterService(&_Pay_serviceDesc, srv)
  64. }
  65. func _Pay_PayNotify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  66. in := new(PayNotifyRequest)
  67. if err := dec(in); err != nil {
  68. return nil, err
  69. }
  70. if interceptor == nil {
  71. return srv.(PayServer).PayNotify(ctx, in)
  72. }
  73. info := &grpc.UnaryServerInfo{
  74. Server: srv,
  75. FullMethod: "/ticket.service.sales.v1.Pay/PayNotify",
  76. }
  77. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  78. return srv.(PayServer).PayNotify(ctx, req.(*PayNotifyRequest))
  79. }
  80. return interceptor(ctx, in, info, handler)
  81. }
  82. var _Pay_serviceDesc = grpc.ServiceDesc{
  83. ServiceName: "ticket.service.sales.v1.Pay",
  84. HandlerType: (*PayServer)(nil),
  85. Methods: []grpc.MethodDesc{
  86. {
  87. MethodName: "PayNotify",
  88. Handler: _Pay_PayNotify_Handler,
  89. },
  90. },
  91. Streams: []grpc.StreamDesc{},
  92. Metadata: "app/service/openplatform/ticket-sales/api/grpc/v1/pay.proto",
  93. }
  94. func (m *PayNotifyRequest) Marshal() (dAtA []byte, err error) {
  95. size := m.Size()
  96. dAtA = make([]byte, size)
  97. n, err := m.MarshalTo(dAtA)
  98. if err != nil {
  99. return nil, err
  100. }
  101. return dAtA[:n], nil
  102. }
  103. func (m *PayNotifyRequest) MarshalTo(dAtA []byte) (int, error) {
  104. var i int
  105. _ = i
  106. var l int
  107. _ = l
  108. if len(m.MsgID) > 0 {
  109. dAtA[i] = 0xa
  110. i++
  111. i = encodeVarintPay(dAtA, i, uint64(len(m.MsgID)))
  112. i += copy(dAtA[i:], m.MsgID)
  113. }
  114. if len(m.MsgContent) > 0 {
  115. dAtA[i] = 0x12
  116. i++
  117. i = encodeVarintPay(dAtA, i, uint64(len(m.MsgContent)))
  118. i += copy(dAtA[i:], m.MsgContent)
  119. }
  120. if m.TestMode {
  121. dAtA[i] = 0x18
  122. i++
  123. if m.TestMode {
  124. dAtA[i] = 1
  125. } else {
  126. dAtA[i] = 0
  127. }
  128. i++
  129. }
  130. return i, nil
  131. }
  132. func (m *PayNotifyResponse) Marshal() (dAtA []byte, err error) {
  133. size := m.Size()
  134. dAtA = make([]byte, size)
  135. n, err := m.MarshalTo(dAtA)
  136. if err != nil {
  137. return nil, err
  138. }
  139. return dAtA[:n], nil
  140. }
  141. func (m *PayNotifyResponse) MarshalTo(dAtA []byte) (int, error) {
  142. var i int
  143. _ = i
  144. var l int
  145. _ = l
  146. return i, nil
  147. }
  148. func encodeVarintPay(dAtA []byte, offset int, v uint64) int {
  149. for v >= 1<<7 {
  150. dAtA[offset] = uint8(v&0x7f | 0x80)
  151. v >>= 7
  152. offset++
  153. }
  154. dAtA[offset] = uint8(v)
  155. return offset + 1
  156. }
  157. func (m *PayNotifyRequest) Size() (n int) {
  158. var l int
  159. _ = l
  160. l = len(m.MsgID)
  161. if l > 0 {
  162. n += 1 + l + sovPay(uint64(l))
  163. }
  164. l = len(m.MsgContent)
  165. if l > 0 {
  166. n += 1 + l + sovPay(uint64(l))
  167. }
  168. if m.TestMode {
  169. n += 2
  170. }
  171. return n
  172. }
  173. func (m *PayNotifyResponse) Size() (n int) {
  174. var l int
  175. _ = l
  176. return n
  177. }
  178. func sovPay(x uint64) (n int) {
  179. for {
  180. n++
  181. x >>= 7
  182. if x == 0 {
  183. break
  184. }
  185. }
  186. return n
  187. }
  188. func sozPay(x uint64) (n int) {
  189. return sovPay(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  190. }
  191. func (this *PayNotifyRequest) String() string {
  192. if this == nil {
  193. return "nil"
  194. }
  195. s := strings.Join([]string{`&PayNotifyRequest{`,
  196. `MsgID:` + fmt.Sprintf("%v", this.MsgID) + `,`,
  197. `MsgContent:` + fmt.Sprintf("%v", this.MsgContent) + `,`,
  198. `TestMode:` + fmt.Sprintf("%v", this.TestMode) + `,`,
  199. `}`,
  200. }, "")
  201. return s
  202. }
  203. func (this *PayNotifyResponse) String() string {
  204. if this == nil {
  205. return "nil"
  206. }
  207. s := strings.Join([]string{`&PayNotifyResponse{`,
  208. `}`,
  209. }, "")
  210. return s
  211. }
  212. func valueToStringPay(v interface{}) string {
  213. rv := reflect.ValueOf(v)
  214. if rv.IsNil() {
  215. return "nil"
  216. }
  217. pv := reflect.Indirect(rv).Interface()
  218. return fmt.Sprintf("*%v", pv)
  219. }
  220. func (m *PayNotifyRequest) Unmarshal(dAtA []byte) error {
  221. l := len(dAtA)
  222. iNdEx := 0
  223. for iNdEx < l {
  224. preIndex := iNdEx
  225. var wire uint64
  226. for shift := uint(0); ; shift += 7 {
  227. if shift >= 64 {
  228. return ErrIntOverflowPay
  229. }
  230. if iNdEx >= l {
  231. return io.ErrUnexpectedEOF
  232. }
  233. b := dAtA[iNdEx]
  234. iNdEx++
  235. wire |= (uint64(b) & 0x7F) << shift
  236. if b < 0x80 {
  237. break
  238. }
  239. }
  240. fieldNum := int32(wire >> 3)
  241. wireType := int(wire & 0x7)
  242. if wireType == 4 {
  243. return fmt.Errorf("proto: PayNotifyRequest: wiretype end group for non-group")
  244. }
  245. if fieldNum <= 0 {
  246. return fmt.Errorf("proto: PayNotifyRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  247. }
  248. switch fieldNum {
  249. case 1:
  250. if wireType != 2 {
  251. return fmt.Errorf("proto: wrong wireType = %d for field MsgID", wireType)
  252. }
  253. var stringLen uint64
  254. for shift := uint(0); ; shift += 7 {
  255. if shift >= 64 {
  256. return ErrIntOverflowPay
  257. }
  258. if iNdEx >= l {
  259. return io.ErrUnexpectedEOF
  260. }
  261. b := dAtA[iNdEx]
  262. iNdEx++
  263. stringLen |= (uint64(b) & 0x7F) << shift
  264. if b < 0x80 {
  265. break
  266. }
  267. }
  268. intStringLen := int(stringLen)
  269. if intStringLen < 0 {
  270. return ErrInvalidLengthPay
  271. }
  272. postIndex := iNdEx + intStringLen
  273. if postIndex > l {
  274. return io.ErrUnexpectedEOF
  275. }
  276. m.MsgID = string(dAtA[iNdEx:postIndex])
  277. iNdEx = postIndex
  278. case 2:
  279. if wireType != 2 {
  280. return fmt.Errorf("proto: wrong wireType = %d for field MsgContent", wireType)
  281. }
  282. var stringLen uint64
  283. for shift := uint(0); ; shift += 7 {
  284. if shift >= 64 {
  285. return ErrIntOverflowPay
  286. }
  287. if iNdEx >= l {
  288. return io.ErrUnexpectedEOF
  289. }
  290. b := dAtA[iNdEx]
  291. iNdEx++
  292. stringLen |= (uint64(b) & 0x7F) << shift
  293. if b < 0x80 {
  294. break
  295. }
  296. }
  297. intStringLen := int(stringLen)
  298. if intStringLen < 0 {
  299. return ErrInvalidLengthPay
  300. }
  301. postIndex := iNdEx + intStringLen
  302. if postIndex > l {
  303. return io.ErrUnexpectedEOF
  304. }
  305. m.MsgContent = string(dAtA[iNdEx:postIndex])
  306. iNdEx = postIndex
  307. case 3:
  308. if wireType != 0 {
  309. return fmt.Errorf("proto: wrong wireType = %d for field TestMode", wireType)
  310. }
  311. var v int
  312. for shift := uint(0); ; shift += 7 {
  313. if shift >= 64 {
  314. return ErrIntOverflowPay
  315. }
  316. if iNdEx >= l {
  317. return io.ErrUnexpectedEOF
  318. }
  319. b := dAtA[iNdEx]
  320. iNdEx++
  321. v |= (int(b) & 0x7F) << shift
  322. if b < 0x80 {
  323. break
  324. }
  325. }
  326. m.TestMode = bool(v != 0)
  327. default:
  328. iNdEx = preIndex
  329. skippy, err := skipPay(dAtA[iNdEx:])
  330. if err != nil {
  331. return err
  332. }
  333. if skippy < 0 {
  334. return ErrInvalidLengthPay
  335. }
  336. if (iNdEx + skippy) > l {
  337. return io.ErrUnexpectedEOF
  338. }
  339. iNdEx += skippy
  340. }
  341. }
  342. if iNdEx > l {
  343. return io.ErrUnexpectedEOF
  344. }
  345. return nil
  346. }
  347. func (m *PayNotifyResponse) Unmarshal(dAtA []byte) error {
  348. l := len(dAtA)
  349. iNdEx := 0
  350. for iNdEx < l {
  351. preIndex := iNdEx
  352. var wire uint64
  353. for shift := uint(0); ; shift += 7 {
  354. if shift >= 64 {
  355. return ErrIntOverflowPay
  356. }
  357. if iNdEx >= l {
  358. return io.ErrUnexpectedEOF
  359. }
  360. b := dAtA[iNdEx]
  361. iNdEx++
  362. wire |= (uint64(b) & 0x7F) << shift
  363. if b < 0x80 {
  364. break
  365. }
  366. }
  367. fieldNum := int32(wire >> 3)
  368. wireType := int(wire & 0x7)
  369. if wireType == 4 {
  370. return fmt.Errorf("proto: PayNotifyResponse: wiretype end group for non-group")
  371. }
  372. if fieldNum <= 0 {
  373. return fmt.Errorf("proto: PayNotifyResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  374. }
  375. switch fieldNum {
  376. default:
  377. iNdEx = preIndex
  378. skippy, err := skipPay(dAtA[iNdEx:])
  379. if err != nil {
  380. return err
  381. }
  382. if skippy < 0 {
  383. return ErrInvalidLengthPay
  384. }
  385. if (iNdEx + skippy) > l {
  386. return io.ErrUnexpectedEOF
  387. }
  388. iNdEx += skippy
  389. }
  390. }
  391. if iNdEx > l {
  392. return io.ErrUnexpectedEOF
  393. }
  394. return nil
  395. }
  396. func skipPay(dAtA []byte) (n int, err error) {
  397. l := len(dAtA)
  398. iNdEx := 0
  399. for iNdEx < l {
  400. var wire uint64
  401. for shift := uint(0); ; shift += 7 {
  402. if shift >= 64 {
  403. return 0, ErrIntOverflowPay
  404. }
  405. if iNdEx >= l {
  406. return 0, io.ErrUnexpectedEOF
  407. }
  408. b := dAtA[iNdEx]
  409. iNdEx++
  410. wire |= (uint64(b) & 0x7F) << shift
  411. if b < 0x80 {
  412. break
  413. }
  414. }
  415. wireType := int(wire & 0x7)
  416. switch wireType {
  417. case 0:
  418. for shift := uint(0); ; shift += 7 {
  419. if shift >= 64 {
  420. return 0, ErrIntOverflowPay
  421. }
  422. if iNdEx >= l {
  423. return 0, io.ErrUnexpectedEOF
  424. }
  425. iNdEx++
  426. if dAtA[iNdEx-1] < 0x80 {
  427. break
  428. }
  429. }
  430. return iNdEx, nil
  431. case 1:
  432. iNdEx += 8
  433. return iNdEx, nil
  434. case 2:
  435. var length int
  436. for shift := uint(0); ; shift += 7 {
  437. if shift >= 64 {
  438. return 0, ErrIntOverflowPay
  439. }
  440. if iNdEx >= l {
  441. return 0, io.ErrUnexpectedEOF
  442. }
  443. b := dAtA[iNdEx]
  444. iNdEx++
  445. length |= (int(b) & 0x7F) << shift
  446. if b < 0x80 {
  447. break
  448. }
  449. }
  450. iNdEx += length
  451. if length < 0 {
  452. return 0, ErrInvalidLengthPay
  453. }
  454. return iNdEx, nil
  455. case 3:
  456. for {
  457. var innerWire uint64
  458. var start int = iNdEx
  459. for shift := uint(0); ; shift += 7 {
  460. if shift >= 64 {
  461. return 0, ErrIntOverflowPay
  462. }
  463. if iNdEx >= l {
  464. return 0, io.ErrUnexpectedEOF
  465. }
  466. b := dAtA[iNdEx]
  467. iNdEx++
  468. innerWire |= (uint64(b) & 0x7F) << shift
  469. if b < 0x80 {
  470. break
  471. }
  472. }
  473. innerWireType := int(innerWire & 0x7)
  474. if innerWireType == 4 {
  475. break
  476. }
  477. next, err := skipPay(dAtA[start:])
  478. if err != nil {
  479. return 0, err
  480. }
  481. iNdEx = start + next
  482. }
  483. return iNdEx, nil
  484. case 4:
  485. return iNdEx, nil
  486. case 5:
  487. iNdEx += 4
  488. return iNdEx, nil
  489. default:
  490. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  491. }
  492. }
  493. panic("unreachable")
  494. }
  495. var (
  496. ErrInvalidLengthPay = fmt.Errorf("proto: negative length found during unmarshaling")
  497. ErrIntOverflowPay = fmt.Errorf("proto: integer overflow")
  498. )
  499. func init() {
  500. proto.RegisterFile("app/service/openplatform/ticket-sales/api/grpc/v1/pay.proto", fileDescriptorPay)
  501. }
  502. var fileDescriptorPay = []byte{
  503. // 287 bytes of a gzipped FileDescriptorProto
  504. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x31, 0x4f, 0xc3, 0x30,
  505. 0x10, 0x85, 0xeb, 0x56, 0x45, 0xad, 0x27, 0x30, 0x03, 0x55, 0x84, 0xdc, 0xaa, 0x53, 0x41, 0xaa,
  506. 0xad, 0xc0, 0xc8, 0x56, 0x58, 0x18, 0x8a, 0xaa, 0x8c, 0x6c, 0x4e, 0x70, 0x8c, 0x45, 0x93, 0x33,
  507. 0xb1, 0x13, 0x29, 0x1b, 0x3f, 0xaf, 0x23, 0x23, 0x13, 0xa2, 0xf9, 0x25, 0xa8, 0x0e, 0xaa, 0x2a,
  508. 0x24, 0x24, 0x36, 0xbf, 0xe7, 0xef, 0xee, 0xdd, 0x1d, 0xbe, 0x11, 0xc6, 0x70, 0x2b, 0x8b, 0x4a,
  509. 0x27, 0x92, 0x83, 0x91, 0xb9, 0x59, 0x0b, 0x97, 0x42, 0x91, 0x71, 0xa7, 0x93, 0x17, 0xe9, 0xe6,
  510. 0x56, 0xac, 0xa5, 0xe5, 0xc2, 0x68, 0xae, 0x0a, 0x93, 0xf0, 0x2a, 0xe4, 0x46, 0xd4, 0xcc, 0x14,
  511. 0xe0, 0x80, 0x9c, 0xb5, 0x0c, 0xfb, 0xa9, 0x67, 0x9e, 0x65, 0x55, 0x18, 0xcc, 0x95, 0x76, 0xcf,
  512. 0x65, 0xcc, 0x12, 0xc8, 0xb8, 0x02, 0x05, 0xdc, 0xf3, 0x71, 0x99, 0x7a, 0xe5, 0x85, 0x7f, 0xb5,
  513. 0x7d, 0xa6, 0x80, 0x8f, 0x57, 0xa2, 0x7e, 0x00, 0xa7, 0xd3, 0x3a, 0x92, 0xaf, 0xa5, 0xb4, 0x8e,
  514. 0x8c, 0x71, 0x3f, 0xb3, 0xea, 0xfe, 0x6e, 0x84, 0x26, 0x68, 0x36, 0x5c, 0x0c, 0x9b, 0xcf, 0x71,
  515. 0x7f, 0xb9, 0x33, 0xa2, 0xd6, 0x27, 0x14, 0xe3, 0xcc, 0xaa, 0x5b, 0xc8, 0x9d, 0xcc, 0xdd, 0xa8,
  516. 0xbb, 0xa3, 0xa2, 0x03, 0x87, 0x04, 0x78, 0xe0, 0xa4, 0x75, 0x4b, 0x78, 0x92, 0xa3, 0xde, 0x04,
  517. 0xcd, 0x06, 0xd1, 0x5e, 0x4f, 0x4f, 0xf1, 0xc9, 0x41, 0xa0, 0x35, 0x90, 0x5b, 0x79, 0xa5, 0x71,
  518. 0x6f, 0x25, 0x6a, 0x12, 0xe3, 0xe1, 0xfe, 0x8f, 0x5c, 0xb0, 0x3f, 0x56, 0x64, 0xbf, 0x07, 0x0e,
  519. 0x2e, 0xff, 0x83, 0xb6, 0x51, 0x8b, 0xf3, 0xcd, 0x96, 0x76, 0x3e, 0xb6, 0xb4, 0xf3, 0xd6, 0x50,
  520. 0xb4, 0x69, 0x28, 0x7a, 0x6f, 0x28, 0xfa, 0x6a, 0x28, 0x7a, 0xec, 0x56, 0x61, 0x7c, 0xe4, 0xaf,
  521. 0x72, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x7d, 0x78, 0x04, 0x37, 0x9c, 0x01, 0x00, 0x00,
  522. }