Remind.liverpc.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
  2. // source: v1/Remind.proto
  3. package v1
  4. import context "context"
  5. import proto "github.com/golang/protobuf/proto"
  6. import "go-common/library/net/rpc/liverpc"
  7. var _ proto.Message // generate to suppress unused imports
  8. // ================
  9. // Remind Interface
  10. // ================
  11. type RemindRPCClient interface {
  12. // * 预约、取消提醒
  13. //
  14. Operate(ctx context.Context, req *RemindOperateReq, opts ...liverpc.CallOption) (resp *RemindOperateResp, err error)
  15. // * 查询预约状态
  16. //
  17. Query(ctx context.Context, req *RemindQueryReq, opts ...liverpc.CallOption) (resp *RemindQueryResp, err error)
  18. // * 预约、取消提醒
  19. //
  20. Submit(ctx context.Context, req *RemindSubmitReq, opts ...liverpc.CallOption) (resp *RemindSubmitResp, err error)
  21. // * 查询预约状态
  22. //
  23. Get(ctx context.Context, req *RemindGetReq, opts ...liverpc.CallOption) (resp *RemindGetResp, err error)
  24. }
  25. // ======================
  26. // Remind Live Rpc Client
  27. // ======================
  28. type remindRPCClient struct {
  29. client *liverpc.Client
  30. }
  31. // NewRemindRPCClient creates a client that implements the RemindRPCClient interface.
  32. func NewRemindRPCClient(client *liverpc.Client) RemindRPCClient {
  33. return &remindRPCClient{
  34. client: client,
  35. }
  36. }
  37. func (c *remindRPCClient) Operate(ctx context.Context, in *RemindOperateReq, opts ...liverpc.CallOption) (*RemindOperateResp, error) {
  38. out := new(RemindOperateResp)
  39. err := doRPCRequest(ctx, c.client, 1, "Remind.operate", in, out, opts)
  40. if err != nil {
  41. return nil, err
  42. }
  43. return out, nil
  44. }
  45. func (c *remindRPCClient) Query(ctx context.Context, in *RemindQueryReq, opts ...liverpc.CallOption) (*RemindQueryResp, error) {
  46. out := new(RemindQueryResp)
  47. err := doRPCRequest(ctx, c.client, 1, "Remind.query", in, out, opts)
  48. if err != nil {
  49. return nil, err
  50. }
  51. return out, nil
  52. }
  53. func (c *remindRPCClient) Submit(ctx context.Context, in *RemindSubmitReq, opts ...liverpc.CallOption) (*RemindSubmitResp, error) {
  54. out := new(RemindSubmitResp)
  55. err := doRPCRequest(ctx, c.client, 1, "Remind.submit", in, out, opts)
  56. if err != nil {
  57. return nil, err
  58. }
  59. return out, nil
  60. }
  61. func (c *remindRPCClient) Get(ctx context.Context, in *RemindGetReq, opts ...liverpc.CallOption) (*RemindGetResp, error) {
  62. out := new(RemindGetResp)
  63. err := doRPCRequest(ctx, c.client, 1, "Remind.get", in, out, opts)
  64. if err != nil {
  65. return nil, err
  66. }
  67. return out, nil
  68. }