mqtt_service.pb.go 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: mqtt_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-device/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("mqtt_service.proto", fileDescriptor_cbc3e69b5d2bfe54)
  26. }
  27. var fileDescriptor_cbc3e69b5d2bfe54 = []byte{
  28. // 199 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0x2c, 0x29,
  30. 0x89, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2,
  31. 0x2a, 0x48, 0xd2, 0x83, 0x8a, 0x48, 0xf1, 0x96, 0x19, 0xea, 0x83, 0x94, 0x40, 0xa4, 0x8c, 0xa6,
  32. 0x30, 0x71, 0xb1, 0xf8, 0x16, 0x96, 0x94, 0x08, 0xb9, 0x71, 0xf1, 0xb8, 0x25, 0x26, 0xa7, 0x86,
  33. 0x67, 0x64, 0x96, 0xa4, 0x3a, 0xa6, 0xa4, 0x08, 0x49, 0xe9, 0x15, 0x24, 0xc5, 0x97, 0x19, 0xea,
  34. 0x21, 0x0b, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x48, 0x49, 0x60, 0x95, 0x2b, 0xc8, 0xa9,
  35. 0x54, 0x62, 0x40, 0x31, 0xc7, 0x25, 0x35, 0x07, 0xd3, 0x1c, 0x97, 0xd4, 0x1c, 0x9c, 0xe6, 0x80,
  36. 0xe5, 0x20, 0xe6, 0x38, 0x70, 0x71, 0x81, 0x84, 0x83, 0x52, 0x93, 0xf2, 0xf3, 0x4b, 0x84, 0x90,
  37. 0x55, 0x42, 0x84, 0x60, 0x66, 0x88, 0x61, 0x91, 0x81, 0x98, 0x60, 0xc5, 0xc5, 0x01, 0x12, 0xf4,
  38. 0x2f, 0x48, 0xcd, 0x13, 0x42, 0x56, 0x05, 0x12, 0x80, 0xe9, 0x16, 0xc1, 0x10, 0x07, 0xeb, 0x75,
  39. 0x12, 0x89, 0x12, 0x2a, 0x28, 0xca, 0x2f, 0x48, 0x2d, 0x2a, 0xa9, 0xd4, 0x4d, 0x49, 0x05, 0x05,
  40. 0x9c, 0x7e, 0x41, 0x52, 0x12, 0x1b, 0x38, 0xcc, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x91,
  41. 0x0a, 0xd0, 0x11, 0x64, 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. // MqttClient is the client API for Mqtt 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 MqttClient interface {
  53. FaceWhiteAdd(ctx context.Context, in *v1.FaceWhiteAddRequest, opts ...grpc.CallOption) (*v1.FaceWhiteAddReply, error)
  54. FaceWhiteDel(ctx context.Context, in *v1.FaceWhiteDelRequest, opts ...grpc.CallOption) (*v1.FaceWhiteDelReply, error)
  55. FaceReboot(ctx context.Context, in *v1.FaceRebootRequest, opts ...grpc.CallOption) (*v1.FaceRebootReply, error)
  56. FaceOpen(ctx context.Context, in *v1.FaceOpenRequest, opts ...grpc.CallOption) (*v1.FaceOpenReply, error)
  57. }
  58. type mqttClient struct {
  59. cc grpc.ClientConnInterface
  60. }
  61. func NewMqttClient(cc grpc.ClientConnInterface) MqttClient {
  62. return &mqttClient{cc}
  63. }
  64. func (c *mqttClient) FaceWhiteAdd(ctx context.Context, in *v1.FaceWhiteAddRequest, opts ...grpc.CallOption) (*v1.FaceWhiteAddReply, error) {
  65. out := new(v1.FaceWhiteAddReply)
  66. err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceWhiteAdd", in, out, opts...)
  67. if err != nil {
  68. return nil, err
  69. }
  70. return out, nil
  71. }
  72. func (c *mqttClient) FaceWhiteDel(ctx context.Context, in *v1.FaceWhiteDelRequest, opts ...grpc.CallOption) (*v1.FaceWhiteDelReply, error) {
  73. out := new(v1.FaceWhiteDelReply)
  74. err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceWhiteDel", in, out, opts...)
  75. if err != nil {
  76. return nil, err
  77. }
  78. return out, nil
  79. }
  80. func (c *mqttClient) FaceReboot(ctx context.Context, in *v1.FaceRebootRequest, opts ...grpc.CallOption) (*v1.FaceRebootReply, error) {
  81. out := new(v1.FaceRebootReply)
  82. err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceReboot", in, out, opts...)
  83. if err != nil {
  84. return nil, err
  85. }
  86. return out, nil
  87. }
  88. func (c *mqttClient) FaceOpen(ctx context.Context, in *v1.FaceOpenRequest, opts ...grpc.CallOption) (*v1.FaceOpenReply, error) {
  89. out := new(v1.FaceOpenReply)
  90. err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceOpen", in, out, opts...)
  91. if err != nil {
  92. return nil, err
  93. }
  94. return out, nil
  95. }
  96. // MqttServer is the server API for Mqtt service.
  97. type MqttServer interface {
  98. FaceWhiteAdd(context.Context, *v1.FaceWhiteAddRequest) (*v1.FaceWhiteAddReply, error)
  99. FaceWhiteDel(context.Context, *v1.FaceWhiteDelRequest) (*v1.FaceWhiteDelReply, error)
  100. FaceReboot(context.Context, *v1.FaceRebootRequest) (*v1.FaceRebootReply, error)
  101. FaceOpen(context.Context, *v1.FaceOpenRequest) (*v1.FaceOpenReply, error)
  102. }
  103. // UnimplementedMqttServer can be embedded to have forward compatible implementations.
  104. type UnimplementedMqttServer struct {
  105. }
  106. func (*UnimplementedMqttServer) FaceWhiteAdd(ctx context.Context, req *v1.FaceWhiteAddRequest) (*v1.FaceWhiteAddReply, error) {
  107. return nil, status.Errorf(codes.Unimplemented, "method FaceWhiteAdd not implemented")
  108. }
  109. func (*UnimplementedMqttServer) FaceWhiteDel(ctx context.Context, req *v1.FaceWhiteDelRequest) (*v1.FaceWhiteDelReply, error) {
  110. return nil, status.Errorf(codes.Unimplemented, "method FaceWhiteDel not implemented")
  111. }
  112. func (*UnimplementedMqttServer) FaceReboot(ctx context.Context, req *v1.FaceRebootRequest) (*v1.FaceRebootReply, error) {
  113. return nil, status.Errorf(codes.Unimplemented, "method FaceReboot not implemented")
  114. }
  115. func (*UnimplementedMqttServer) FaceOpen(ctx context.Context, req *v1.FaceOpenRequest) (*v1.FaceOpenReply, error) {
  116. return nil, status.Errorf(codes.Unimplemented, "method FaceOpen not implemented")
  117. }
  118. func RegisterMqttServer(s *grpc.Server, srv MqttServer) {
  119. s.RegisterService(&_Mqtt_serviceDesc, srv)
  120. }
  121. func _Mqtt_FaceWhiteAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  122. in := new(v1.FaceWhiteAddRequest)
  123. if err := dec(in); err != nil {
  124. return nil, err
  125. }
  126. if interceptor == nil {
  127. return srv.(MqttServer).FaceWhiteAdd(ctx, in)
  128. }
  129. info := &grpc.UnaryServerInfo{
  130. Server: srv,
  131. FullMethod: "/pb.service.Mqtt/FaceWhiteAdd",
  132. }
  133. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  134. return srv.(MqttServer).FaceWhiteAdd(ctx, req.(*v1.FaceWhiteAddRequest))
  135. }
  136. return interceptor(ctx, in, info, handler)
  137. }
  138. func _Mqtt_FaceWhiteDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  139. in := new(v1.FaceWhiteDelRequest)
  140. if err := dec(in); err != nil {
  141. return nil, err
  142. }
  143. if interceptor == nil {
  144. return srv.(MqttServer).FaceWhiteDel(ctx, in)
  145. }
  146. info := &grpc.UnaryServerInfo{
  147. Server: srv,
  148. FullMethod: "/pb.service.Mqtt/FaceWhiteDel",
  149. }
  150. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  151. return srv.(MqttServer).FaceWhiteDel(ctx, req.(*v1.FaceWhiteDelRequest))
  152. }
  153. return interceptor(ctx, in, info, handler)
  154. }
  155. func _Mqtt_FaceReboot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  156. in := new(v1.FaceRebootRequest)
  157. if err := dec(in); err != nil {
  158. return nil, err
  159. }
  160. if interceptor == nil {
  161. return srv.(MqttServer).FaceReboot(ctx, in)
  162. }
  163. info := &grpc.UnaryServerInfo{
  164. Server: srv,
  165. FullMethod: "/pb.service.Mqtt/FaceReboot",
  166. }
  167. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  168. return srv.(MqttServer).FaceReboot(ctx, req.(*v1.FaceRebootRequest))
  169. }
  170. return interceptor(ctx, in, info, handler)
  171. }
  172. func _Mqtt_FaceOpen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  173. in := new(v1.FaceOpenRequest)
  174. if err := dec(in); err != nil {
  175. return nil, err
  176. }
  177. if interceptor == nil {
  178. return srv.(MqttServer).FaceOpen(ctx, in)
  179. }
  180. info := &grpc.UnaryServerInfo{
  181. Server: srv,
  182. FullMethod: "/pb.service.Mqtt/FaceOpen",
  183. }
  184. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  185. return srv.(MqttServer).FaceOpen(ctx, req.(*v1.FaceOpenRequest))
  186. }
  187. return interceptor(ctx, in, info, handler)
  188. }
  189. var _Mqtt_serviceDesc = grpc.ServiceDesc{
  190. ServiceName: "pb.service.Mqtt",
  191. HandlerType: (*MqttServer)(nil),
  192. Methods: []grpc.MethodDesc{
  193. {
  194. MethodName: "FaceWhiteAdd",
  195. Handler: _Mqtt_FaceWhiteAdd_Handler,
  196. },
  197. {
  198. MethodName: "FaceWhiteDel",
  199. Handler: _Mqtt_FaceWhiteDel_Handler,
  200. },
  201. {
  202. MethodName: "FaceReboot",
  203. Handler: _Mqtt_FaceReboot_Handler,
  204. },
  205. {
  206. MethodName: "FaceOpen",
  207. Handler: _Mqtt_FaceOpen_Handler,
  208. },
  209. },
  210. Streams: []grpc.StreamDesc{},
  211. Metadata: "mqtt_service.proto",
  212. }