123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: smart_thirdparty.proto
- // package声明符,用来防止不同的消息类型有命名冲突
- package pb
- import (
- context "context"
- v1 "dust-monitor/pb/v1"
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- math "math"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
- func init() {
- proto.RegisterFile("smart_thirdparty.proto", fileDescriptor_ac31429b2392a396)
- }
- var fileDescriptor_ac31429b2392a396 = []byte{
- // 192 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2b, 0xce, 0x4d, 0x2c,
- 0x2a, 0x89, 0x2f, 0xc9, 0xc8, 0x2c, 0x4a, 0x29, 0x48, 0x2c, 0x2a, 0xa9, 0xd4, 0x2b, 0x28, 0xca,
- 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x92, 0x12, 0x2e, 0x33, 0xd4, 0x47, 0x97, 0x30, 0x6a, 0x65,
- 0xe2, 0x12, 0x0e, 0x06, 0xe9, 0x09, 0xce, 0x2c, 0x49, 0x0d, 0x81, 0xcb, 0x0a, 0xf9, 0x70, 0x09,
- 0x84, 0xa7, 0x26, 0x96, 0x64, 0xa4, 0x16, 0x39, 0xe7, 0xe7, 0xa5, 0x64, 0x96, 0x64, 0xe6, 0xe7,
- 0x09, 0x49, 0xeb, 0x95, 0x19, 0xea, 0xa1, 0x8b, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x48,
- 0x49, 0x62, 0x97, 0x2c, 0xc8, 0xa9, 0x54, 0x62, 0x10, 0xf2, 0xe7, 0x12, 0x84, 0x4a, 0xb9, 0xe6,
- 0x95, 0x65, 0x16, 0xe5, 0xe7, 0xa6, 0xe6, 0x95, 0x08, 0xc9, 0x20, 0xe9, 0x40, 0x08, 0xc3, 0xcc,
- 0x93, 0xc2, 0x21, 0x8b, 0x6e, 0xa0, 0x5b, 0x7e, 0x51, 0x6a, 0x72, 0x62, 0x71, 0x89, 0xa1, 0x29,
- 0x8a, 0x81, 0x08, 0x61, 0x6c, 0x06, 0x22, 0xcb, 0x82, 0x0d, 0x74, 0x12, 0x8c, 0xe2, 0x4f, 0x29,
- 0x2d, 0x2e, 0xd1, 0xcd, 0xcd, 0xcf, 0xcb, 0x2c, 0xc9, 0x2f, 0xd2, 0x2f, 0x48, 0x4a, 0x62, 0x03,
- 0x87, 0x90, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xd6, 0x77, 0x06, 0x54, 0x01, 0x00, 0x00,
- }
- // Reference imports to suppress errors if they are not otherwise used.
- var _ context.Context
- var _ grpc.ClientConnInterface
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion6
- // SmartSiteThirdpartyClient is the client API for SmartSiteThirdparty service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type SmartSiteThirdpartyClient interface {
- // 实时天气情况
- WeatherCondition(ctx context.Context, in *v1.WeatherConditionRequest, opts ...grpc.CallOption) (*v1.WeatherConditionReply, error)
- // 获取实时空气质量
- WeatherEnviroment(ctx context.Context, in *v1.WeatherEnviromentRequest, opts ...grpc.CallOption) (*v1.WeatherEnviromentReply, error)
- WeatherForecast15(ctx context.Context, in *v1.WeatherForecast15Request, opts ...grpc.CallOption) (*v1.WeatherForecast15Reply, error)
- }
- type smartSiteThirdpartyClient struct {
- cc grpc.ClientConnInterface
- }
- func NewSmartSiteThirdpartyClient(cc grpc.ClientConnInterface) SmartSiteThirdpartyClient {
- return &smartSiteThirdpartyClient{cc}
- }
- func (c *smartSiteThirdpartyClient) WeatherCondition(ctx context.Context, in *v1.WeatherConditionRequest, opts ...grpc.CallOption) (*v1.WeatherConditionReply, error) {
- out := new(v1.WeatherConditionReply)
- err := c.cc.Invoke(ctx, "/pb.SmartSiteThirdparty/WeatherCondition", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *smartSiteThirdpartyClient) WeatherEnviroment(ctx context.Context, in *v1.WeatherEnviromentRequest, opts ...grpc.CallOption) (*v1.WeatherEnviromentReply, error) {
- out := new(v1.WeatherEnviromentReply)
- err := c.cc.Invoke(ctx, "/pb.SmartSiteThirdparty/WeatherEnviroment", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *smartSiteThirdpartyClient) WeatherForecast15(ctx context.Context, in *v1.WeatherForecast15Request, opts ...grpc.CallOption) (*v1.WeatherForecast15Reply, error) {
- out := new(v1.WeatherForecast15Reply)
- err := c.cc.Invoke(ctx, "/pb.SmartSiteThirdparty/WeatherForecast15", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // SmartSiteThirdpartyServer is the server API for SmartSiteThirdparty service.
- type SmartSiteThirdpartyServer interface {
- // 实时天气情况
- WeatherCondition(context.Context, *v1.WeatherConditionRequest) (*v1.WeatherConditionReply, error)
- // 获取实时空气质量
- WeatherEnviroment(context.Context, *v1.WeatherEnviromentRequest) (*v1.WeatherEnviromentReply, error)
- WeatherForecast15(context.Context, *v1.WeatherForecast15Request) (*v1.WeatherForecast15Reply, error)
- }
- // UnimplementedSmartSiteThirdpartyServer can be embedded to have forward compatible implementations.
- type UnimplementedSmartSiteThirdpartyServer struct {
- }
- func (*UnimplementedSmartSiteThirdpartyServer) WeatherCondition(ctx context.Context, req *v1.WeatherConditionRequest) (*v1.WeatherConditionReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method WeatherCondition not implemented")
- }
- func (*UnimplementedSmartSiteThirdpartyServer) WeatherEnviroment(ctx context.Context, req *v1.WeatherEnviromentRequest) (*v1.WeatherEnviromentReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method WeatherEnviroment not implemented")
- }
- func (*UnimplementedSmartSiteThirdpartyServer) WeatherForecast15(ctx context.Context, req *v1.WeatherForecast15Request) (*v1.WeatherForecast15Reply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method WeatherForecast15 not implemented")
- }
- func RegisterSmartSiteThirdpartyServer(s *grpc.Server, srv SmartSiteThirdpartyServer) {
- s.RegisterService(&_SmartSiteThirdparty_serviceDesc, srv)
- }
- func _SmartSiteThirdparty_WeatherCondition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.WeatherConditionRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SmartSiteThirdpartyServer).WeatherCondition(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.SmartSiteThirdparty/WeatherCondition",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SmartSiteThirdpartyServer).WeatherCondition(ctx, req.(*v1.WeatherConditionRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SmartSiteThirdparty_WeatherEnviroment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.WeatherEnviromentRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SmartSiteThirdpartyServer).WeatherEnviroment(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.SmartSiteThirdparty/WeatherEnviroment",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SmartSiteThirdpartyServer).WeatherEnviroment(ctx, req.(*v1.WeatherEnviromentRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _SmartSiteThirdparty_WeatherForecast15_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.WeatherForecast15Request)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(SmartSiteThirdpartyServer).WeatherForecast15(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.SmartSiteThirdparty/WeatherForecast15",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(SmartSiteThirdpartyServer).WeatherForecast15(ctx, req.(*v1.WeatherForecast15Request))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _SmartSiteThirdparty_serviceDesc = grpc.ServiceDesc{
- ServiceName: "pb.SmartSiteThirdparty",
- HandlerType: (*SmartSiteThirdpartyServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "WeatherCondition",
- Handler: _SmartSiteThirdparty_WeatherCondition_Handler,
- },
- {
- MethodName: "WeatherEnviroment",
- Handler: _SmartSiteThirdparty_WeatherEnviroment_Handler,
- },
- {
- MethodName: "WeatherForecast15",
- Handler: _SmartSiteThirdparty_WeatherForecast15_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "smart_thirdparty.proto",
- }
|