smart_thirdparty.pb.go 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: smart_thirdparty.proto
  3. // package声明符,用来防止不同的消息类型有命名冲突
  4. package pb
  5. import (
  6. context "context"
  7. v1 "dust-monitor/pb/v1"
  8. fmt "fmt"
  9. proto "github.com/golang/protobuf/proto"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. math "math"
  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("smart_thirdparty.proto", fileDescriptor_ac31429b2392a396)
  26. }
  27. var fileDescriptor_ac31429b2392a396 = []byte{
  28. // 192 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2b, 0xce, 0x4d, 0x2c,
  30. 0x2a, 0x89, 0x2f, 0xc9, 0xc8, 0x2c, 0x4a, 0x29, 0x48, 0x2c, 0x2a, 0xa9, 0xd4, 0x2b, 0x28, 0xca,
  31. 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x92, 0x12, 0x2e, 0x33, 0xd4, 0x47, 0x97, 0x30, 0x6a, 0x65,
  32. 0xe2, 0x12, 0x0e, 0x06, 0xe9, 0x09, 0xce, 0x2c, 0x49, 0x0d, 0x81, 0xcb, 0x0a, 0xf9, 0x70, 0x09,
  33. 0x84, 0xa7, 0x26, 0x96, 0x64, 0xa4, 0x16, 0x39, 0xe7, 0xe7, 0xa5, 0x64, 0x96, 0x64, 0xe6, 0xe7,
  34. 0x09, 0x49, 0xeb, 0x95, 0x19, 0xea, 0xa1, 0x8b, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x48,
  35. 0x49, 0x62, 0x97, 0x2c, 0xc8, 0xa9, 0x54, 0x62, 0x10, 0xf2, 0xe7, 0x12, 0x84, 0x4a, 0xb9, 0xe6,
  36. 0x95, 0x65, 0x16, 0xe5, 0xe7, 0xa6, 0xe6, 0x95, 0x08, 0xc9, 0x20, 0xe9, 0x40, 0x08, 0xc3, 0xcc,
  37. 0x93, 0xc2, 0x21, 0x8b, 0x6e, 0xa0, 0x5b, 0x7e, 0x51, 0x6a, 0x72, 0x62, 0x71, 0x89, 0xa1, 0x29,
  38. 0x8a, 0x81, 0x08, 0x61, 0x6c, 0x06, 0x22, 0xcb, 0x82, 0x0d, 0x74, 0x12, 0x8c, 0xe2, 0x4f, 0x29,
  39. 0x2d, 0x2e, 0xd1, 0xcd, 0xcd, 0xcf, 0xcb, 0x2c, 0xc9, 0x2f, 0xd2, 0x2f, 0x48, 0x4a, 0x62, 0x03,
  40. 0x87, 0x90, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xd6, 0x77, 0x06, 0x54, 0x01, 0x00, 0x00,
  41. }
  42. // Reference imports to suppress errors if they are not otherwise used.
  43. var _ context.Context
  44. var _ grpc.ClientConnInterface
  45. // This is a compile-time assertion to ensure that this generated file
  46. // is compatible with the grpc package it is being compiled against.
  47. const _ = grpc.SupportPackageIsVersion6
  48. // SmartSiteThirdpartyClient is the client API for SmartSiteThirdparty service.
  49. //
  50. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  51. type SmartSiteThirdpartyClient interface {
  52. // 实时天气情况
  53. WeatherCondition(ctx context.Context, in *v1.WeatherConditionRequest, opts ...grpc.CallOption) (*v1.WeatherConditionReply, error)
  54. // 获取实时空气质量
  55. WeatherEnviroment(ctx context.Context, in *v1.WeatherEnviromentRequest, opts ...grpc.CallOption) (*v1.WeatherEnviromentReply, error)
  56. WeatherForecast15(ctx context.Context, in *v1.WeatherForecast15Request, opts ...grpc.CallOption) (*v1.WeatherForecast15Reply, error)
  57. }
  58. type smartSiteThirdpartyClient struct {
  59. cc grpc.ClientConnInterface
  60. }
  61. func NewSmartSiteThirdpartyClient(cc grpc.ClientConnInterface) SmartSiteThirdpartyClient {
  62. return &smartSiteThirdpartyClient{cc}
  63. }
  64. func (c *smartSiteThirdpartyClient) WeatherCondition(ctx context.Context, in *v1.WeatherConditionRequest, opts ...grpc.CallOption) (*v1.WeatherConditionReply, error) {
  65. out := new(v1.WeatherConditionReply)
  66. err := c.cc.Invoke(ctx, "/pb.SmartSiteThirdparty/WeatherCondition", in, out, opts...)
  67. if err != nil {
  68. return nil, err
  69. }
  70. return out, nil
  71. }
  72. func (c *smartSiteThirdpartyClient) WeatherEnviroment(ctx context.Context, in *v1.WeatherEnviromentRequest, opts ...grpc.CallOption) (*v1.WeatherEnviromentReply, error) {
  73. out := new(v1.WeatherEnviromentReply)
  74. err := c.cc.Invoke(ctx, "/pb.SmartSiteThirdparty/WeatherEnviroment", in, out, opts...)
  75. if err != nil {
  76. return nil, err
  77. }
  78. return out, nil
  79. }
  80. func (c *smartSiteThirdpartyClient) WeatherForecast15(ctx context.Context, in *v1.WeatherForecast15Request, opts ...grpc.CallOption) (*v1.WeatherForecast15Reply, error) {
  81. out := new(v1.WeatherForecast15Reply)
  82. err := c.cc.Invoke(ctx, "/pb.SmartSiteThirdparty/WeatherForecast15", in, out, opts...)
  83. if err != nil {
  84. return nil, err
  85. }
  86. return out, nil
  87. }
  88. // SmartSiteThirdpartyServer is the server API for SmartSiteThirdparty service.
  89. type SmartSiteThirdpartyServer interface {
  90. // 实时天气情况
  91. WeatherCondition(context.Context, *v1.WeatherConditionRequest) (*v1.WeatherConditionReply, error)
  92. // 获取实时空气质量
  93. WeatherEnviroment(context.Context, *v1.WeatherEnviromentRequest) (*v1.WeatherEnviromentReply, error)
  94. WeatherForecast15(context.Context, *v1.WeatherForecast15Request) (*v1.WeatherForecast15Reply, error)
  95. }
  96. // UnimplementedSmartSiteThirdpartyServer can be embedded to have forward compatible implementations.
  97. type UnimplementedSmartSiteThirdpartyServer struct {
  98. }
  99. func (*UnimplementedSmartSiteThirdpartyServer) WeatherCondition(ctx context.Context, req *v1.WeatherConditionRequest) (*v1.WeatherConditionReply, error) {
  100. return nil, status.Errorf(codes.Unimplemented, "method WeatherCondition not implemented")
  101. }
  102. func (*UnimplementedSmartSiteThirdpartyServer) WeatherEnviroment(ctx context.Context, req *v1.WeatherEnviromentRequest) (*v1.WeatherEnviromentReply, error) {
  103. return nil, status.Errorf(codes.Unimplemented, "method WeatherEnviroment not implemented")
  104. }
  105. func (*UnimplementedSmartSiteThirdpartyServer) WeatherForecast15(ctx context.Context, req *v1.WeatherForecast15Request) (*v1.WeatherForecast15Reply, error) {
  106. return nil, status.Errorf(codes.Unimplemented, "method WeatherForecast15 not implemented")
  107. }
  108. func RegisterSmartSiteThirdpartyServer(s *grpc.Server, srv SmartSiteThirdpartyServer) {
  109. s.RegisterService(&_SmartSiteThirdparty_serviceDesc, srv)
  110. }
  111. func _SmartSiteThirdparty_WeatherCondition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  112. in := new(v1.WeatherConditionRequest)
  113. if err := dec(in); err != nil {
  114. return nil, err
  115. }
  116. if interceptor == nil {
  117. return srv.(SmartSiteThirdpartyServer).WeatherCondition(ctx, in)
  118. }
  119. info := &grpc.UnaryServerInfo{
  120. Server: srv,
  121. FullMethod: "/pb.SmartSiteThirdparty/WeatherCondition",
  122. }
  123. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  124. return srv.(SmartSiteThirdpartyServer).WeatherCondition(ctx, req.(*v1.WeatherConditionRequest))
  125. }
  126. return interceptor(ctx, in, info, handler)
  127. }
  128. func _SmartSiteThirdparty_WeatherEnviroment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  129. in := new(v1.WeatherEnviromentRequest)
  130. if err := dec(in); err != nil {
  131. return nil, err
  132. }
  133. if interceptor == nil {
  134. return srv.(SmartSiteThirdpartyServer).WeatherEnviroment(ctx, in)
  135. }
  136. info := &grpc.UnaryServerInfo{
  137. Server: srv,
  138. FullMethod: "/pb.SmartSiteThirdparty/WeatherEnviroment",
  139. }
  140. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  141. return srv.(SmartSiteThirdpartyServer).WeatherEnviroment(ctx, req.(*v1.WeatherEnviromentRequest))
  142. }
  143. return interceptor(ctx, in, info, handler)
  144. }
  145. func _SmartSiteThirdparty_WeatherForecast15_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  146. in := new(v1.WeatherForecast15Request)
  147. if err := dec(in); err != nil {
  148. return nil, err
  149. }
  150. if interceptor == nil {
  151. return srv.(SmartSiteThirdpartyServer).WeatherForecast15(ctx, in)
  152. }
  153. info := &grpc.UnaryServerInfo{
  154. Server: srv,
  155. FullMethod: "/pb.SmartSiteThirdparty/WeatherForecast15",
  156. }
  157. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  158. return srv.(SmartSiteThirdpartyServer).WeatherForecast15(ctx, req.(*v1.WeatherForecast15Request))
  159. }
  160. return interceptor(ctx, in, info, handler)
  161. }
  162. var _SmartSiteThirdparty_serviceDesc = grpc.ServiceDesc{
  163. ServiceName: "pb.SmartSiteThirdparty",
  164. HandlerType: (*SmartSiteThirdpartyServer)(nil),
  165. Methods: []grpc.MethodDesc{
  166. {
  167. MethodName: "WeatherCondition",
  168. Handler: _SmartSiteThirdparty_WeatherCondition_Handler,
  169. },
  170. {
  171. MethodName: "WeatherEnviroment",
  172. Handler: _SmartSiteThirdparty_WeatherEnviroment_Handler,
  173. },
  174. {
  175. MethodName: "WeatherForecast15",
  176. Handler: _SmartSiteThirdparty_WeatherForecast15_Handler,
  177. },
  178. },
  179. Streams: []grpc.StreamDesc{},
  180. Metadata: "smart_thirdparty.proto",
  181. }