garden_service.pb.go 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: garden_service.proto
  3. // package声明符,用来防止不同的消息类型有命名冲突
  4. package pb
  5. import (
  6. context "context"
  7. fmt "fmt"
  8. proto "github.com/golang/protobuf/proto"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. math "math"
  13. v1 "property-task/pb/v1"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  24. func init() {
  25. proto.RegisterFile("garden_service.proto", fileDescriptor_e527eed98167eca4)
  26. }
  27. var fileDescriptor_e527eed98167eca4 = []byte{
  28. // 196 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x49, 0x4f, 0x2c, 0x4a,
  30. 0x49, 0xcd, 0x8b, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9,
  31. 0x17, 0xe2, 0x2a, 0x48, 0xd2, 0x83, 0x8a, 0x48, 0xf1, 0x94, 0x19, 0xea, 0xa7, 0xa5, 0x42, 0x65,
  32. 0x8c, 0x3e, 0x31, 0x72, 0xb1, 0xb9, 0x83, 0xb5, 0x08, 0xb9, 0x71, 0xf1, 0xb8, 0xa7, 0xe6, 0xa5,
  33. 0x16, 0x25, 0x96, 0xa4, 0x3a, 0x65, 0xe6, 0xe4, 0x08, 0x49, 0xe9, 0x15, 0x24, 0xc5, 0x97, 0x19,
  34. 0xea, 0x21, 0x0b, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x48, 0x49, 0x60, 0x95, 0x2b, 0xc8,
  35. 0xa9, 0x54, 0x62, 0x10, 0xf2, 0xe1, 0xe2, 0x73, 0xce, 0x48, 0x2c, 0x4a, 0x4f, 0x0d, 0x2d, 0x4a,
  36. 0x4f, 0xf5, 0xcc, 0x4b, 0xcb, 0x17, 0x92, 0x81, 0xaa, 0x46, 0x15, 0x86, 0x99, 0x25, 0x85, 0x43,
  37. 0x16, 0x62, 0x5a, 0x10, 0x97, 0x00, 0xcc, 0x92, 0xa0, 0xd4, 0xdc, 0xcc, 0xbc, 0x94, 0xd4, 0x22,
  38. 0x21, 0x39, 0x34, 0xdb, 0x61, 0x12, 0x30, 0x13, 0x65, 0x70, 0xca, 0x83, 0xcd, 0x74, 0x12, 0x8a,
  39. 0x12, 0x28, 0x28, 0xca, 0x2f, 0x48, 0x2d, 0x2a, 0xa9, 0xd4, 0x2d, 0x49, 0x2c, 0xce, 0xd6, 0x2f,
  40. 0x48, 0x4a, 0x62, 0x03, 0x87, 0x87, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xc8, 0xc7, 0x56,
  41. 0x41, 0x01, 0x00, 0x00,
  42. }
  43. // Reference imports to suppress errors if they are not otherwise used.
  44. var _ context.Context
  45. var _ grpc.ClientConnInterface
  46. // This is a compile-time assertion to ensure that this generated file
  47. // is compatible with the grpc package it is being compiled against.
  48. const _ = grpc.SupportPackageIsVersion6
  49. // GardenClient is the client API for Garden service.
  50. //
  51. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  52. type GardenClient interface {
  53. // 生成账单
  54. GenerateBill(ctx context.Context, in *v1.GenerateBillRequest, opts ...grpc.CallOption) (*v1.GenerateBillReply, error)
  55. ChargeUrgeInfo(ctx context.Context, in *v1.ChargeUrgeInfoRequest, opts ...grpc.CallOption) (*v1.ChargeUrgeInfoReply, error)
  56. // 获取催缴信息
  57. GenerateReminder(ctx context.Context, in *v1.GenerateReminderRequest, opts ...grpc.CallOption) (*v1.GenerateReminderReply, error)
  58. }
  59. type gardenClient struct {
  60. cc grpc.ClientConnInterface
  61. }
  62. func NewGardenClient(cc grpc.ClientConnInterface) GardenClient {
  63. return &gardenClient{cc}
  64. }
  65. func (c *gardenClient) GenerateBill(ctx context.Context, in *v1.GenerateBillRequest, opts ...grpc.CallOption) (*v1.GenerateBillReply, error) {
  66. out := new(v1.GenerateBillReply)
  67. err := c.cc.Invoke(ctx, "/pb.service.Garden/GenerateBill", in, out, opts...)
  68. if err != nil {
  69. return nil, err
  70. }
  71. return out, nil
  72. }
  73. func (c *gardenClient) ChargeUrgeInfo(ctx context.Context, in *v1.ChargeUrgeInfoRequest, opts ...grpc.CallOption) (*v1.ChargeUrgeInfoReply, error) {
  74. out := new(v1.ChargeUrgeInfoReply)
  75. err := c.cc.Invoke(ctx, "/pb.service.Garden/ChargeUrgeInfo", in, out, opts...)
  76. if err != nil {
  77. return nil, err
  78. }
  79. return out, nil
  80. }
  81. func (c *gardenClient) GenerateReminder(ctx context.Context, in *v1.GenerateReminderRequest, opts ...grpc.CallOption) (*v1.GenerateReminderReply, error) {
  82. out := new(v1.GenerateReminderReply)
  83. err := c.cc.Invoke(ctx, "/pb.service.Garden/GenerateReminder", in, out, opts...)
  84. if err != nil {
  85. return nil, err
  86. }
  87. return out, nil
  88. }
  89. // GardenServer is the server API for Garden service.
  90. type GardenServer interface {
  91. // 生成账单
  92. GenerateBill(context.Context, *v1.GenerateBillRequest) (*v1.GenerateBillReply, error)
  93. ChargeUrgeInfo(context.Context, *v1.ChargeUrgeInfoRequest) (*v1.ChargeUrgeInfoReply, error)
  94. // 获取催缴信息
  95. GenerateReminder(context.Context, *v1.GenerateReminderRequest) (*v1.GenerateReminderReply, error)
  96. }
  97. // UnimplementedGardenServer can be embedded to have forward compatible implementations.
  98. type UnimplementedGardenServer struct {
  99. }
  100. func (*UnimplementedGardenServer) GenerateBill(ctx context.Context, req *v1.GenerateBillRequest) (*v1.GenerateBillReply, error) {
  101. return nil, status.Errorf(codes.Unimplemented, "method GenerateBill not implemented")
  102. }
  103. func (*UnimplementedGardenServer) ChargeUrgeInfo(ctx context.Context, req *v1.ChargeUrgeInfoRequest) (*v1.ChargeUrgeInfoReply, error) {
  104. return nil, status.Errorf(codes.Unimplemented, "method ChargeUrgeInfo not implemented")
  105. }
  106. func (*UnimplementedGardenServer) GenerateReminder(ctx context.Context, req *v1.GenerateReminderRequest) (*v1.GenerateReminderReply, error) {
  107. return nil, status.Errorf(codes.Unimplemented, "method GenerateReminder not implemented")
  108. }
  109. func RegisterGardenServer(s *grpc.Server, srv GardenServer) {
  110. s.RegisterService(&_Garden_serviceDesc, srv)
  111. }
  112. func _Garden_GenerateBill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  113. in := new(v1.GenerateBillRequest)
  114. if err := dec(in); err != nil {
  115. return nil, err
  116. }
  117. if interceptor == nil {
  118. return srv.(GardenServer).GenerateBill(ctx, in)
  119. }
  120. info := &grpc.UnaryServerInfo{
  121. Server: srv,
  122. FullMethod: "/pb.service.Garden/GenerateBill",
  123. }
  124. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  125. return srv.(GardenServer).GenerateBill(ctx, req.(*v1.GenerateBillRequest))
  126. }
  127. return interceptor(ctx, in, info, handler)
  128. }
  129. func _Garden_ChargeUrgeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  130. in := new(v1.ChargeUrgeInfoRequest)
  131. if err := dec(in); err != nil {
  132. return nil, err
  133. }
  134. if interceptor == nil {
  135. return srv.(GardenServer).ChargeUrgeInfo(ctx, in)
  136. }
  137. info := &grpc.UnaryServerInfo{
  138. Server: srv,
  139. FullMethod: "/pb.service.Garden/ChargeUrgeInfo",
  140. }
  141. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  142. return srv.(GardenServer).ChargeUrgeInfo(ctx, req.(*v1.ChargeUrgeInfoRequest))
  143. }
  144. return interceptor(ctx, in, info, handler)
  145. }
  146. func _Garden_GenerateReminder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  147. in := new(v1.GenerateReminderRequest)
  148. if err := dec(in); err != nil {
  149. return nil, err
  150. }
  151. if interceptor == nil {
  152. return srv.(GardenServer).GenerateReminder(ctx, in)
  153. }
  154. info := &grpc.UnaryServerInfo{
  155. Server: srv,
  156. FullMethod: "/pb.service.Garden/GenerateReminder",
  157. }
  158. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  159. return srv.(GardenServer).GenerateReminder(ctx, req.(*v1.GenerateReminderRequest))
  160. }
  161. return interceptor(ctx, in, info, handler)
  162. }
  163. var _Garden_serviceDesc = grpc.ServiceDesc{
  164. ServiceName: "pb.service.Garden",
  165. HandlerType: (*GardenServer)(nil),
  166. Methods: []grpc.MethodDesc{
  167. {
  168. MethodName: "GenerateBill",
  169. Handler: _Garden_GenerateBill_Handler,
  170. },
  171. {
  172. MethodName: "ChargeUrgeInfo",
  173. Handler: _Garden_ChargeUrgeInfo_Handler,
  174. },
  175. {
  176. MethodName: "GenerateReminder",
  177. Handler: _Garden_GenerateReminder_Handler,
  178. },
  179. },
  180. Streams: []grpc.StreamDesc{},
  181. Metadata: "garden_service.proto",
  182. }