api.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: app/admin/ep/saga/api/grpc/v1/api.proto
  3. package v1
  4. import proto "github.com/gogo/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import (
  8. context "golang.org/x/net/context"
  9. grpc "google.golang.org/grpc"
  10. )
  11. import io "io"
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  21. type PushMsgReq struct {
  22. Username []string `protobuf:"bytes,1,rep,name=username" json:"username,omitempty"`
  23. Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
  24. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  25. XXX_unrecognized []byte `json:"-"`
  26. XXX_sizecache int32 `json:"-"`
  27. }
  28. func (m *PushMsgReq) Reset() { *m = PushMsgReq{} }
  29. func (m *PushMsgReq) String() string { return proto.CompactTextString(m) }
  30. func (*PushMsgReq) ProtoMessage() {}
  31. func (*PushMsgReq) Descriptor() ([]byte, []int) {
  32. return fileDescriptor_api_d78a3f3b47284b33, []int{0}
  33. }
  34. func (m *PushMsgReq) XXX_Unmarshal(b []byte) error {
  35. return m.Unmarshal(b)
  36. }
  37. func (m *PushMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  38. if deterministic {
  39. return xxx_messageInfo_PushMsgReq.Marshal(b, m, deterministic)
  40. } else {
  41. b = b[:cap(b)]
  42. n, err := m.MarshalTo(b)
  43. if err != nil {
  44. return nil, err
  45. }
  46. return b[:n], nil
  47. }
  48. }
  49. func (dst *PushMsgReq) XXX_Merge(src proto.Message) {
  50. xxx_messageInfo_PushMsgReq.Merge(dst, src)
  51. }
  52. func (m *PushMsgReq) XXX_Size() int {
  53. return m.Size()
  54. }
  55. func (m *PushMsgReq) XXX_DiscardUnknown() {
  56. xxx_messageInfo_PushMsgReq.DiscardUnknown(m)
  57. }
  58. var xxx_messageInfo_PushMsgReq proto.InternalMessageInfo
  59. func (m *PushMsgReq) GetUsername() []string {
  60. if m != nil {
  61. return m.Username
  62. }
  63. return nil
  64. }
  65. func (m *PushMsgReq) GetContent() string {
  66. if m != nil {
  67. return m.Content
  68. }
  69. return ""
  70. }
  71. type PushMsgReply struct {
  72. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  73. XXX_unrecognized []byte `json:"-"`
  74. XXX_sizecache int32 `json:"-"`
  75. }
  76. func (m *PushMsgReply) Reset() { *m = PushMsgReply{} }
  77. func (m *PushMsgReply) String() string { return proto.CompactTextString(m) }
  78. func (*PushMsgReply) ProtoMessage() {}
  79. func (*PushMsgReply) Descriptor() ([]byte, []int) {
  80. return fileDescriptor_api_d78a3f3b47284b33, []int{1}
  81. }
  82. func (m *PushMsgReply) XXX_Unmarshal(b []byte) error {
  83. return m.Unmarshal(b)
  84. }
  85. func (m *PushMsgReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  86. if deterministic {
  87. return xxx_messageInfo_PushMsgReply.Marshal(b, m, deterministic)
  88. } else {
  89. b = b[:cap(b)]
  90. n, err := m.MarshalTo(b)
  91. if err != nil {
  92. return nil, err
  93. }
  94. return b[:n], nil
  95. }
  96. }
  97. func (dst *PushMsgReply) XXX_Merge(src proto.Message) {
  98. xxx_messageInfo_PushMsgReply.Merge(dst, src)
  99. }
  100. func (m *PushMsgReply) XXX_Size() int {
  101. return m.Size()
  102. }
  103. func (m *PushMsgReply) XXX_DiscardUnknown() {
  104. xxx_messageInfo_PushMsgReply.DiscardUnknown(m)
  105. }
  106. var xxx_messageInfo_PushMsgReply proto.InternalMessageInfo
  107. func init() {
  108. proto.RegisterType((*PushMsgReq)(nil), "test.ep.sagaadmin.v1.PushMsgReq")
  109. proto.RegisterType((*PushMsgReply)(nil), "test.ep.sagaadmin.v1.PushMsgReply")
  110. }
  111. // Reference imports to suppress errors if they are not otherwise used.
  112. var _ context.Context
  113. var _ grpc.ClientConn
  114. // This is a compile-time assertion to ensure that this generated file
  115. // is compatible with the grpc package it is being compiled against.
  116. const _ = grpc.SupportPackageIsVersion4
  117. // SagaAdminClient is the client API for SagaAdmin service.
  118. //
  119. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  120. type SagaAdminClient interface {
  121. PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error)
  122. }
  123. type sagaAdminClient struct {
  124. cc *grpc.ClientConn
  125. }
  126. func NewSagaAdminClient(cc *grpc.ClientConn) SagaAdminClient {
  127. return &sagaAdminClient{cc}
  128. }
  129. func (c *sagaAdminClient) PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgReply, error) {
  130. out := new(PushMsgReply)
  131. err := c.cc.Invoke(ctx, "/test.ep.sagaadmin.v1.SagaAdmin/PushMsg", in, out, opts...)
  132. if err != nil {
  133. return nil, err
  134. }
  135. return out, nil
  136. }
  137. // SagaAdminServer is the server API for SagaAdmin service.
  138. type SagaAdminServer interface {
  139. PushMsg(context.Context, *PushMsgReq) (*PushMsgReply, error)
  140. }
  141. func RegisterSagaAdminServer(s *grpc.Server, srv SagaAdminServer) {
  142. s.RegisterService(&_SagaAdmin_serviceDesc, srv)
  143. }
  144. func _SagaAdmin_PushMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  145. in := new(PushMsgReq)
  146. if err := dec(in); err != nil {
  147. return nil, err
  148. }
  149. if interceptor == nil {
  150. return srv.(SagaAdminServer).PushMsg(ctx, in)
  151. }
  152. info := &grpc.UnaryServerInfo{
  153. Server: srv,
  154. FullMethod: "/test.ep.sagaadmin.v1.SagaAdmin/PushMsg",
  155. }
  156. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  157. return srv.(SagaAdminServer).PushMsg(ctx, req.(*PushMsgReq))
  158. }
  159. return interceptor(ctx, in, info, handler)
  160. }
  161. var _SagaAdmin_serviceDesc = grpc.ServiceDesc{
  162. ServiceName: "test.ep.sagaadmin.v1.SagaAdmin",
  163. HandlerType: (*SagaAdminServer)(nil),
  164. Methods: []grpc.MethodDesc{
  165. {
  166. MethodName: "PushMsg",
  167. Handler: _SagaAdmin_PushMsg_Handler,
  168. },
  169. },
  170. Streams: []grpc.StreamDesc{},
  171. Metadata: "app/admin/ep/saga/api/grpc/v1/api.proto",
  172. }
  173. func (m *PushMsgReq) Marshal() (dAtA []byte, err error) {
  174. size := m.Size()
  175. dAtA = make([]byte, size)
  176. n, err := m.MarshalTo(dAtA)
  177. if err != nil {
  178. return nil, err
  179. }
  180. return dAtA[:n], nil
  181. }
  182. func (m *PushMsgReq) MarshalTo(dAtA []byte) (int, error) {
  183. var i int
  184. _ = i
  185. var l int
  186. _ = l
  187. if len(m.Username) > 0 {
  188. for _, s := range m.Username {
  189. dAtA[i] = 0xa
  190. i++
  191. l = len(s)
  192. for l >= 1<<7 {
  193. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  194. l >>= 7
  195. i++
  196. }
  197. dAtA[i] = uint8(l)
  198. i++
  199. i += copy(dAtA[i:], s)
  200. }
  201. }
  202. if len(m.Content) > 0 {
  203. dAtA[i] = 0x12
  204. i++
  205. i = encodeVarintApi(dAtA, i, uint64(len(m.Content)))
  206. i += copy(dAtA[i:], m.Content)
  207. }
  208. if m.XXX_unrecognized != nil {
  209. i += copy(dAtA[i:], m.XXX_unrecognized)
  210. }
  211. return i, nil
  212. }
  213. func (m *PushMsgReply) Marshal() (dAtA []byte, err error) {
  214. size := m.Size()
  215. dAtA = make([]byte, size)
  216. n, err := m.MarshalTo(dAtA)
  217. if err != nil {
  218. return nil, err
  219. }
  220. return dAtA[:n], nil
  221. }
  222. func (m *PushMsgReply) MarshalTo(dAtA []byte) (int, error) {
  223. var i int
  224. _ = i
  225. var l int
  226. _ = l
  227. if m.XXX_unrecognized != nil {
  228. i += copy(dAtA[i:], m.XXX_unrecognized)
  229. }
  230. return i, nil
  231. }
  232. func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
  233. for v >= 1<<7 {
  234. dAtA[offset] = uint8(v&0x7f | 0x80)
  235. v >>= 7
  236. offset++
  237. }
  238. dAtA[offset] = uint8(v)
  239. return offset + 1
  240. }
  241. func (m *PushMsgReq) Size() (n int) {
  242. var l int
  243. _ = l
  244. if len(m.Username) > 0 {
  245. for _, s := range m.Username {
  246. l = len(s)
  247. n += 1 + l + sovApi(uint64(l))
  248. }
  249. }
  250. l = len(m.Content)
  251. if l > 0 {
  252. n += 1 + l + sovApi(uint64(l))
  253. }
  254. if m.XXX_unrecognized != nil {
  255. n += len(m.XXX_unrecognized)
  256. }
  257. return n
  258. }
  259. func (m *PushMsgReply) Size() (n int) {
  260. var l int
  261. _ = l
  262. if m.XXX_unrecognized != nil {
  263. n += len(m.XXX_unrecognized)
  264. }
  265. return n
  266. }
  267. func sovApi(x uint64) (n int) {
  268. for {
  269. n++
  270. x >>= 7
  271. if x == 0 {
  272. break
  273. }
  274. }
  275. return n
  276. }
  277. func sozApi(x uint64) (n int) {
  278. return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  279. }
  280. func (m *PushMsgReq) Unmarshal(dAtA []byte) error {
  281. l := len(dAtA)
  282. iNdEx := 0
  283. for iNdEx < l {
  284. preIndex := iNdEx
  285. var wire uint64
  286. for shift := uint(0); ; shift += 7 {
  287. if shift >= 64 {
  288. return ErrIntOverflowApi
  289. }
  290. if iNdEx >= l {
  291. return io.ErrUnexpectedEOF
  292. }
  293. b := dAtA[iNdEx]
  294. iNdEx++
  295. wire |= (uint64(b) & 0x7F) << shift
  296. if b < 0x80 {
  297. break
  298. }
  299. }
  300. fieldNum := int32(wire >> 3)
  301. wireType := int(wire & 0x7)
  302. if wireType == 4 {
  303. return fmt.Errorf("proto: PushMsgReq: wiretype end group for non-group")
  304. }
  305. if fieldNum <= 0 {
  306. return fmt.Errorf("proto: PushMsgReq: illegal tag %d (wire type %d)", fieldNum, wire)
  307. }
  308. switch fieldNum {
  309. case 1:
  310. if wireType != 2 {
  311. return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType)
  312. }
  313. var stringLen uint64
  314. for shift := uint(0); ; shift += 7 {
  315. if shift >= 64 {
  316. return ErrIntOverflowApi
  317. }
  318. if iNdEx >= l {
  319. return io.ErrUnexpectedEOF
  320. }
  321. b := dAtA[iNdEx]
  322. iNdEx++
  323. stringLen |= (uint64(b) & 0x7F) << shift
  324. if b < 0x80 {
  325. break
  326. }
  327. }
  328. intStringLen := int(stringLen)
  329. if intStringLen < 0 {
  330. return ErrInvalidLengthApi
  331. }
  332. postIndex := iNdEx + intStringLen
  333. if postIndex > l {
  334. return io.ErrUnexpectedEOF
  335. }
  336. m.Username = append(m.Username, string(dAtA[iNdEx:postIndex]))
  337. iNdEx = postIndex
  338. case 2:
  339. if wireType != 2 {
  340. return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
  341. }
  342. var stringLen uint64
  343. for shift := uint(0); ; shift += 7 {
  344. if shift >= 64 {
  345. return ErrIntOverflowApi
  346. }
  347. if iNdEx >= l {
  348. return io.ErrUnexpectedEOF
  349. }
  350. b := dAtA[iNdEx]
  351. iNdEx++
  352. stringLen |= (uint64(b) & 0x7F) << shift
  353. if b < 0x80 {
  354. break
  355. }
  356. }
  357. intStringLen := int(stringLen)
  358. if intStringLen < 0 {
  359. return ErrInvalidLengthApi
  360. }
  361. postIndex := iNdEx + intStringLen
  362. if postIndex > l {
  363. return io.ErrUnexpectedEOF
  364. }
  365. m.Content = string(dAtA[iNdEx:postIndex])
  366. iNdEx = postIndex
  367. default:
  368. iNdEx = preIndex
  369. skippy, err := skipApi(dAtA[iNdEx:])
  370. if err != nil {
  371. return err
  372. }
  373. if skippy < 0 {
  374. return ErrInvalidLengthApi
  375. }
  376. if (iNdEx + skippy) > l {
  377. return io.ErrUnexpectedEOF
  378. }
  379. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  380. iNdEx += skippy
  381. }
  382. }
  383. if iNdEx > l {
  384. return io.ErrUnexpectedEOF
  385. }
  386. return nil
  387. }
  388. func (m *PushMsgReply) Unmarshal(dAtA []byte) error {
  389. l := len(dAtA)
  390. iNdEx := 0
  391. for iNdEx < l {
  392. preIndex := iNdEx
  393. var wire uint64
  394. for shift := uint(0); ; shift += 7 {
  395. if shift >= 64 {
  396. return ErrIntOverflowApi
  397. }
  398. if iNdEx >= l {
  399. return io.ErrUnexpectedEOF
  400. }
  401. b := dAtA[iNdEx]
  402. iNdEx++
  403. wire |= (uint64(b) & 0x7F) << shift
  404. if b < 0x80 {
  405. break
  406. }
  407. }
  408. fieldNum := int32(wire >> 3)
  409. wireType := int(wire & 0x7)
  410. if wireType == 4 {
  411. return fmt.Errorf("proto: PushMsgReply: wiretype end group for non-group")
  412. }
  413. if fieldNum <= 0 {
  414. return fmt.Errorf("proto: PushMsgReply: illegal tag %d (wire type %d)", fieldNum, wire)
  415. }
  416. switch fieldNum {
  417. default:
  418. iNdEx = preIndex
  419. skippy, err := skipApi(dAtA[iNdEx:])
  420. if err != nil {
  421. return err
  422. }
  423. if skippy < 0 {
  424. return ErrInvalidLengthApi
  425. }
  426. if (iNdEx + skippy) > l {
  427. return io.ErrUnexpectedEOF
  428. }
  429. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  430. iNdEx += skippy
  431. }
  432. }
  433. if iNdEx > l {
  434. return io.ErrUnexpectedEOF
  435. }
  436. return nil
  437. }
  438. func skipApi(dAtA []byte) (n int, err error) {
  439. l := len(dAtA)
  440. iNdEx := 0
  441. for iNdEx < l {
  442. var wire uint64
  443. for shift := uint(0); ; shift += 7 {
  444. if shift >= 64 {
  445. return 0, ErrIntOverflowApi
  446. }
  447. if iNdEx >= l {
  448. return 0, io.ErrUnexpectedEOF
  449. }
  450. b := dAtA[iNdEx]
  451. iNdEx++
  452. wire |= (uint64(b) & 0x7F) << shift
  453. if b < 0x80 {
  454. break
  455. }
  456. }
  457. wireType := int(wire & 0x7)
  458. switch wireType {
  459. case 0:
  460. for shift := uint(0); ; shift += 7 {
  461. if shift >= 64 {
  462. return 0, ErrIntOverflowApi
  463. }
  464. if iNdEx >= l {
  465. return 0, io.ErrUnexpectedEOF
  466. }
  467. iNdEx++
  468. if dAtA[iNdEx-1] < 0x80 {
  469. break
  470. }
  471. }
  472. return iNdEx, nil
  473. case 1:
  474. iNdEx += 8
  475. return iNdEx, nil
  476. case 2:
  477. var length int
  478. for shift := uint(0); ; shift += 7 {
  479. if shift >= 64 {
  480. return 0, ErrIntOverflowApi
  481. }
  482. if iNdEx >= l {
  483. return 0, io.ErrUnexpectedEOF
  484. }
  485. b := dAtA[iNdEx]
  486. iNdEx++
  487. length |= (int(b) & 0x7F) << shift
  488. if b < 0x80 {
  489. break
  490. }
  491. }
  492. iNdEx += length
  493. if length < 0 {
  494. return 0, ErrInvalidLengthApi
  495. }
  496. return iNdEx, nil
  497. case 3:
  498. for {
  499. var innerWire uint64
  500. var start int = iNdEx
  501. for shift := uint(0); ; shift += 7 {
  502. if shift >= 64 {
  503. return 0, ErrIntOverflowApi
  504. }
  505. if iNdEx >= l {
  506. return 0, io.ErrUnexpectedEOF
  507. }
  508. b := dAtA[iNdEx]
  509. iNdEx++
  510. innerWire |= (uint64(b) & 0x7F) << shift
  511. if b < 0x80 {
  512. break
  513. }
  514. }
  515. innerWireType := int(innerWire & 0x7)
  516. if innerWireType == 4 {
  517. break
  518. }
  519. next, err := skipApi(dAtA[start:])
  520. if err != nil {
  521. return 0, err
  522. }
  523. iNdEx = start + next
  524. }
  525. return iNdEx, nil
  526. case 4:
  527. return iNdEx, nil
  528. case 5:
  529. iNdEx += 4
  530. return iNdEx, nil
  531. default:
  532. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  533. }
  534. }
  535. panic("unreachable")
  536. }
  537. var (
  538. ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
  539. ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
  540. )
  541. func init() {
  542. proto.RegisterFile("app/admin/ep/saga/api/grpc/v1/api.proto", fileDescriptor_api_d78a3f3b47284b33)
  543. }
  544. var fileDescriptor_api_d78a3f3b47284b33 = []byte{
  545. // 200 bytes of a gzipped FileDescriptorProto
  546. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4f, 0x2c, 0x28, 0xd0,
  547. 0x4f, 0x4c, 0xc9, 0xcd, 0xcc, 0xd3, 0x4f, 0x2d, 0xd0, 0x2f, 0x4e, 0x4c, 0x4f, 0xd4, 0x4f, 0x2c,
  548. 0xc8, 0xd4, 0x4f, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x33, 0x04, 0xb1, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b,
  549. 0xf2, 0x85, 0x44, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x52, 0x0b, 0xf4, 0x40, 0x6a, 0xc0, 0x1a, 0xf4,
  550. 0xca, 0x0c, 0x95, 0x9c, 0xb8, 0xb8, 0x02, 0x4a, 0x8b, 0x33, 0x7c, 0x8b, 0xd3, 0x83, 0x52, 0x0b,
  551. 0x85, 0xa4, 0xb8, 0x38, 0x4a, 0x8b, 0x53, 0x8b, 0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 0x15, 0x98,
  552. 0x35, 0x38, 0x83, 0xe0, 0x7c, 0x21, 0x09, 0x2e, 0xf6, 0xe4, 0xfc, 0xbc, 0x92, 0xd4, 0xbc, 0x12,
  553. 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x89, 0x8f, 0x8b, 0x07, 0x6e, 0x46, 0x41,
  554. 0x4e, 0xa5, 0x51, 0x0c, 0x17, 0x67, 0x70, 0x62, 0x7a, 0xa2, 0x23, 0xc8, 0x0e, 0x21, 0x7f, 0x2e,
  555. 0x76, 0xa8, 0xa4, 0x90, 0x82, 0x1e, 0x36, 0x27, 0xe8, 0x21, 0xec, 0x97, 0x52, 0x22, 0xa0, 0xa2,
  556. 0x20, 0xa7, 0xd2, 0x49, 0xe0, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92,
  557. 0x63, 0x8c, 0x62, 0x2a, 0x33, 0x4c, 0x62, 0x03, 0x7b, 0xd0, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff,
  558. 0xac, 0x58, 0xa2, 0x9e, 0x0b, 0x01, 0x00, 0x00,
  559. }