123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: mqtt_service.proto
- // package声明符,用来防止不同的消息类型有命名冲突
- package pb
- import (
- context "context"
- 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"
- v1 "property-mqtt/pb/v1"
- )
- // 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("mqtt_service.proto", fileDescriptor_cbc3e69b5d2bfe54)
- }
- var fileDescriptor_cbc3e69b5d2bfe54 = []byte{
- // 220 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x41, 0x4b, 0x87, 0x40,
- 0x10, 0xc5, 0x23, 0x22, 0x62, 0x48, 0x88, 0x21, 0xa2, 0xec, 0xd6, 0xbd, 0x15, 0xeb, 0xd6, 0xa9,
- 0x42, 0x84, 0x0e, 0x15, 0x78, 0x09, 0xba, 0x48, 0xab, 0x03, 0x09, 0xd6, 0x8e, 0xeb, 0x64, 0xf8,
- 0x69, 0xfb, 0x2a, 0xb1, 0xae, 0x82, 0xa2, 0xff, 0xeb, 0xef, 0xbd, 0xf7, 0x3b, 0x3c, 0xc0, 0xaf,
- 0x46, 0x24, 0x6f, 0xc9, 0x76, 0x55, 0x41, 0x8a, 0xad, 0x11, 0x83, 0xc0, 0x5a, 0x8d, 0x24, 0x0c,
- 0xba, 0x38, 0x72, 0x15, 0x1f, 0xdd, 0xfc, 0xed, 0xc3, 0xc1, 0x73, 0x23, 0x82, 0x29, 0x1c, 0xa7,
- 0x1f, 0x05, 0xbd, 0x7d, 0x56, 0x42, 0x0f, 0x65, 0x89, 0xa1, 0x62, 0x9d, 0x77, 0xb1, 0x9a, 0xc3,
- 0x8c, 0x9a, 0x1f, 0x6a, 0x25, 0x3c, 0xdf, 0xcc, 0xb8, 0xee, 0xaf, 0xf6, 0x16, 0x9e, 0x84, 0xea,
- 0xb5, 0x27, 0xa1, 0x7a, 0xa7, 0x67, 0xc8, 0xbc, 0xe7, 0x1e, 0xc0, 0xe1, 0x8c, 0xb4, 0x31, 0x82,
- 0xf3, 0xa6, 0x47, 0x93, 0xe3, 0x6c, 0x23, 0xf1, 0x86, 0x3b, 0x38, 0x72, 0xf0, 0x95, 0xe9, 0x1b,
- 0xe7, 0x2d, 0x07, 0xa6, 0xf5, 0xe9, 0x8a, 0xfb, 0xed, 0x13, 0x04, 0x2f, 0xf4, 0xeb, 0x8e, 0x49,
- 0xc8, 0xdd, 0x86, 0x97, 0x63, 0x71, 0x41, 0x27, 0xcb, 0xc5, 0x76, 0x38, 0xa8, 0x1e, 0xf1, 0xfd,
- 0x84, 0xad, 0x61, 0xb2, 0xd2, 0x5f, 0xbb, 0xe3, 0x23, 0xd6, 0xfa, 0x70, 0x38, 0xff, 0xf6, 0x3f,
- 0x00, 0x00, 0xff, 0xff, 0xf5, 0x35, 0x30, 0x2a, 0xad, 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
- // MqttClient is the client API for Mqtt service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type MqttClient interface {
- FaceWhiteAdd(ctx context.Context, in *v1.FaceWhiteAddRequest, opts ...grpc.CallOption) (*v1.FaceWhiteAddReply, error)
- FaceWhiteDel(ctx context.Context, in *v1.FaceWhiteDelRequest, opts ...grpc.CallOption) (*v1.FaceWhiteDelReply, error)
- FaceReboot(ctx context.Context, in *v1.FaceRebootRequest, opts ...grpc.CallOption) (*v1.FaceRebootReply, error)
- FaceOpen(ctx context.Context, in *v1.FaceOpenRequest, opts ...grpc.CallOption) (*v1.FaceOpenReply, error)
- NewMqttDevice(ctx context.Context, in *v1.NewMqttDeviceRequest, opts ...grpc.CallOption) (*v1.NewMqttDeviceReply, error)
- }
- type mqttClient struct {
- cc grpc.ClientConnInterface
- }
- func NewMqttClient(cc grpc.ClientConnInterface) MqttClient {
- return &mqttClient{cc}
- }
- func (c *mqttClient) FaceWhiteAdd(ctx context.Context, in *v1.FaceWhiteAddRequest, opts ...grpc.CallOption) (*v1.FaceWhiteAddReply, error) {
- out := new(v1.FaceWhiteAddReply)
- err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceWhiteAdd", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *mqttClient) FaceWhiteDel(ctx context.Context, in *v1.FaceWhiteDelRequest, opts ...grpc.CallOption) (*v1.FaceWhiteDelReply, error) {
- out := new(v1.FaceWhiteDelReply)
- err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceWhiteDel", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *mqttClient) FaceReboot(ctx context.Context, in *v1.FaceRebootRequest, opts ...grpc.CallOption) (*v1.FaceRebootReply, error) {
- out := new(v1.FaceRebootReply)
- err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceReboot", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *mqttClient) FaceOpen(ctx context.Context, in *v1.FaceOpenRequest, opts ...grpc.CallOption) (*v1.FaceOpenReply, error) {
- out := new(v1.FaceOpenReply)
- err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceOpen", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *mqttClient) NewMqttDevice(ctx context.Context, in *v1.NewMqttDeviceRequest, opts ...grpc.CallOption) (*v1.NewMqttDeviceReply, error) {
- out := new(v1.NewMqttDeviceReply)
- err := c.cc.Invoke(ctx, "/pb.service.Mqtt/NewMqttDevice", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // MqttServer is the server API for Mqtt service.
- type MqttServer interface {
- FaceWhiteAdd(context.Context, *v1.FaceWhiteAddRequest) (*v1.FaceWhiteAddReply, error)
- FaceWhiteDel(context.Context, *v1.FaceWhiteDelRequest) (*v1.FaceWhiteDelReply, error)
- FaceReboot(context.Context, *v1.FaceRebootRequest) (*v1.FaceRebootReply, error)
- FaceOpen(context.Context, *v1.FaceOpenRequest) (*v1.FaceOpenReply, error)
- NewMqttDevice(context.Context, *v1.NewMqttDeviceRequest) (*v1.NewMqttDeviceReply, error)
- }
- // UnimplementedMqttServer can be embedded to have forward compatible implementations.
- type UnimplementedMqttServer struct {
- }
- func (*UnimplementedMqttServer) FaceWhiteAdd(ctx context.Context, req *v1.FaceWhiteAddRequest) (*v1.FaceWhiteAddReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FaceWhiteAdd not implemented")
- }
- func (*UnimplementedMqttServer) FaceWhiteDel(ctx context.Context, req *v1.FaceWhiteDelRequest) (*v1.FaceWhiteDelReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FaceWhiteDel not implemented")
- }
- func (*UnimplementedMqttServer) FaceReboot(ctx context.Context, req *v1.FaceRebootRequest) (*v1.FaceRebootReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FaceReboot not implemented")
- }
- func (*UnimplementedMqttServer) FaceOpen(ctx context.Context, req *v1.FaceOpenRequest) (*v1.FaceOpenReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method FaceOpen not implemented")
- }
- func (*UnimplementedMqttServer) NewMqttDevice(ctx context.Context, req *v1.NewMqttDeviceRequest) (*v1.NewMqttDeviceReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method NewMqttDevice not implemented")
- }
- func RegisterMqttServer(s *grpc.Server, srv MqttServer) {
- s.RegisterService(&_Mqtt_serviceDesc, srv)
- }
- func _Mqtt_FaceWhiteAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.FaceWhiteAddRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(MqttServer).FaceWhiteAdd(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Mqtt/FaceWhiteAdd",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(MqttServer).FaceWhiteAdd(ctx, req.(*v1.FaceWhiteAddRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Mqtt_FaceWhiteDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.FaceWhiteDelRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(MqttServer).FaceWhiteDel(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Mqtt/FaceWhiteDel",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(MqttServer).FaceWhiteDel(ctx, req.(*v1.FaceWhiteDelRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Mqtt_FaceReboot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.FaceRebootRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(MqttServer).FaceReboot(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Mqtt/FaceReboot",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(MqttServer).FaceReboot(ctx, req.(*v1.FaceRebootRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Mqtt_FaceOpen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.FaceOpenRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(MqttServer).FaceOpen(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Mqtt/FaceOpen",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(MqttServer).FaceOpen(ctx, req.(*v1.FaceOpenRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Mqtt_NewMqttDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.NewMqttDeviceRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(MqttServer).NewMqttDevice(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Mqtt/NewMqttDevice",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(MqttServer).NewMqttDevice(ctx, req.(*v1.NewMqttDeviceRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _Mqtt_serviceDesc = grpc.ServiceDesc{
- ServiceName: "pb.service.Mqtt",
- HandlerType: (*MqttServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "FaceWhiteAdd",
- Handler: _Mqtt_FaceWhiteAdd_Handler,
- },
- {
- MethodName: "FaceWhiteDel",
- Handler: _Mqtt_FaceWhiteDel_Handler,
- },
- {
- MethodName: "FaceReboot",
- Handler: _Mqtt_FaceReboot_Handler,
- },
- {
- MethodName: "FaceOpen",
- Handler: _Mqtt_FaceOpen_Handler,
- },
- {
- MethodName: "NewMqttDevice",
- Handler: _Mqtt_NewMqttDevice_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "mqtt_service.proto",
- }
|