123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- // 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-device/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{
- // 199 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0x2c, 0x29,
- 0x89, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2,
- 0x2a, 0x48, 0xd2, 0x83, 0x8a, 0x48, 0xf1, 0x96, 0x19, 0xea, 0x83, 0x94, 0x40, 0xa4, 0x8c, 0xa6,
- 0x30, 0x71, 0xb1, 0xf8, 0x16, 0x96, 0x94, 0x08, 0xb9, 0x71, 0xf1, 0xb8, 0x25, 0x26, 0xa7, 0x86,
- 0x67, 0x64, 0x96, 0xa4, 0x3a, 0xa6, 0xa4, 0x08, 0x49, 0xe9, 0x15, 0x24, 0xc5, 0x97, 0x19, 0xea,
- 0x21, 0x0b, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x48, 0x49, 0x60, 0x95, 0x2b, 0xc8, 0xa9,
- 0x54, 0x62, 0x40, 0x31, 0xc7, 0x25, 0x35, 0x07, 0xd3, 0x1c, 0x97, 0xd4, 0x1c, 0x9c, 0xe6, 0x80,
- 0xe5, 0x20, 0xe6, 0x38, 0x70, 0x71, 0x81, 0x84, 0x83, 0x52, 0x93, 0xf2, 0xf3, 0x4b, 0x84, 0x90,
- 0x55, 0x42, 0x84, 0x60, 0x66, 0x88, 0x61, 0x91, 0x81, 0x98, 0x60, 0xc5, 0xc5, 0x01, 0x12, 0xf4,
- 0x2f, 0x48, 0xcd, 0x13, 0x42, 0x56, 0x05, 0x12, 0x80, 0xe9, 0x16, 0xc1, 0x10, 0x07, 0xeb, 0x75,
- 0x12, 0x89, 0x12, 0x2a, 0x28, 0xca, 0x2f, 0x48, 0x2d, 0x2a, 0xa9, 0xd4, 0x4d, 0x49, 0x05, 0x05,
- 0x9c, 0x7e, 0x41, 0x52, 0x12, 0x1b, 0x38, 0xcc, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x91,
- 0x0a, 0xd0, 0x11, 0x64, 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)
- }
- 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
- }
- // 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)
- }
- // 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 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)
- }
- 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,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "mqtt_service.proto",
- }
|