mqtt_service.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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-mqtt/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. // 220 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x41, 0x4b, 0x87, 0x40,
  30. 0x10, 0xc5, 0x23, 0x22, 0x62, 0x48, 0x88, 0x21, 0xa2, 0xec, 0xd6, 0xbd, 0x15, 0xeb, 0xd6, 0xa9,
  31. 0x42, 0x84, 0x0e, 0x15, 0x78, 0x09, 0xba, 0x48, 0xab, 0x03, 0x09, 0xd6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
  43. }
  44. // Reference imports to suppress errors if they are not otherwise used.
  45. var _ context.Context
  46. var _ grpc.ClientConnInterface
  47. // This is a compile-time assertion to ensure that this generated file
  48. // is compatible with the grpc package it is being compiled against.
  49. const _ = grpc.SupportPackageIsVersion6
  50. // MqttClient is the client API for Mqtt service.
  51. //
  52. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  53. type MqttClient interface {
  54. FaceWhiteAdd(ctx context.Context, in *v1.FaceWhiteAddRequest, opts ...grpc.CallOption) (*v1.FaceWhiteAddReply, error)
  55. FaceWhiteDel(ctx context.Context, in *v1.FaceWhiteDelRequest, opts ...grpc.CallOption) (*v1.FaceWhiteDelReply, error)
  56. FaceReboot(ctx context.Context, in *v1.FaceRebootRequest, opts ...grpc.CallOption) (*v1.FaceRebootReply, error)
  57. FaceOpen(ctx context.Context, in *v1.FaceOpenRequest, opts ...grpc.CallOption) (*v1.FaceOpenReply, error)
  58. NewMqttDevice(ctx context.Context, in *v1.NewMqttDeviceRequest, opts ...grpc.CallOption) (*v1.NewMqttDeviceReply, error)
  59. }
  60. type mqttClient struct {
  61. cc grpc.ClientConnInterface
  62. }
  63. func NewMqttClient(cc grpc.ClientConnInterface) MqttClient {
  64. return &mqttClient{cc}
  65. }
  66. func (c *mqttClient) FaceWhiteAdd(ctx context.Context, in *v1.FaceWhiteAddRequest, opts ...grpc.CallOption) (*v1.FaceWhiteAddReply, error) {
  67. out := new(v1.FaceWhiteAddReply)
  68. err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceWhiteAdd", in, out, opts...)
  69. if err != nil {
  70. return nil, err
  71. }
  72. return out, nil
  73. }
  74. func (c *mqttClient) FaceWhiteDel(ctx context.Context, in *v1.FaceWhiteDelRequest, opts ...grpc.CallOption) (*v1.FaceWhiteDelReply, error) {
  75. out := new(v1.FaceWhiteDelReply)
  76. err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceWhiteDel", in, out, opts...)
  77. if err != nil {
  78. return nil, err
  79. }
  80. return out, nil
  81. }
  82. func (c *mqttClient) FaceReboot(ctx context.Context, in *v1.FaceRebootRequest, opts ...grpc.CallOption) (*v1.FaceRebootReply, error) {
  83. out := new(v1.FaceRebootReply)
  84. err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceReboot", in, out, opts...)
  85. if err != nil {
  86. return nil, err
  87. }
  88. return out, nil
  89. }
  90. func (c *mqttClient) FaceOpen(ctx context.Context, in *v1.FaceOpenRequest, opts ...grpc.CallOption) (*v1.FaceOpenReply, error) {
  91. out := new(v1.FaceOpenReply)
  92. err := c.cc.Invoke(ctx, "/pb.service.Mqtt/FaceOpen", in, out, opts...)
  93. if err != nil {
  94. return nil, err
  95. }
  96. return out, nil
  97. }
  98. func (c *mqttClient) NewMqttDevice(ctx context.Context, in *v1.NewMqttDeviceRequest, opts ...grpc.CallOption) (*v1.NewMqttDeviceReply, error) {
  99. out := new(v1.NewMqttDeviceReply)
  100. err := c.cc.Invoke(ctx, "/pb.service.Mqtt/NewMqttDevice", in, out, opts...)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return out, nil
  105. }
  106. // MqttServer is the server API for Mqtt service.
  107. type MqttServer interface {
  108. FaceWhiteAdd(context.Context, *v1.FaceWhiteAddRequest) (*v1.FaceWhiteAddReply, error)
  109. FaceWhiteDel(context.Context, *v1.FaceWhiteDelRequest) (*v1.FaceWhiteDelReply, error)
  110. FaceReboot(context.Context, *v1.FaceRebootRequest) (*v1.FaceRebootReply, error)
  111. FaceOpen(context.Context, *v1.FaceOpenRequest) (*v1.FaceOpenReply, error)
  112. NewMqttDevice(context.Context, *v1.NewMqttDeviceRequest) (*v1.NewMqttDeviceReply, error)
  113. }
  114. // UnimplementedMqttServer can be embedded to have forward compatible implementations.
  115. type UnimplementedMqttServer struct {
  116. }
  117. func (*UnimplementedMqttServer) FaceWhiteAdd(ctx context.Context, req *v1.FaceWhiteAddRequest) (*v1.FaceWhiteAddReply, error) {
  118. return nil, status.Errorf(codes.Unimplemented, "method FaceWhiteAdd not implemented")
  119. }
  120. func (*UnimplementedMqttServer) FaceWhiteDel(ctx context.Context, req *v1.FaceWhiteDelRequest) (*v1.FaceWhiteDelReply, error) {
  121. return nil, status.Errorf(codes.Unimplemented, "method FaceWhiteDel not implemented")
  122. }
  123. func (*UnimplementedMqttServer) FaceReboot(ctx context.Context, req *v1.FaceRebootRequest) (*v1.FaceRebootReply, error) {
  124. return nil, status.Errorf(codes.Unimplemented, "method FaceReboot not implemented")
  125. }
  126. func (*UnimplementedMqttServer) FaceOpen(ctx context.Context, req *v1.FaceOpenRequest) (*v1.FaceOpenReply, error) {
  127. return nil, status.Errorf(codes.Unimplemented, "method FaceOpen not implemented")
  128. }
  129. func (*UnimplementedMqttServer) NewMqttDevice(ctx context.Context, req *v1.NewMqttDeviceRequest) (*v1.NewMqttDeviceReply, error) {
  130. return nil, status.Errorf(codes.Unimplemented, "method NewMqttDevice not implemented")
  131. }
  132. func RegisterMqttServer(s *grpc.Server, srv MqttServer) {
  133. s.RegisterService(&_Mqtt_serviceDesc, srv)
  134. }
  135. func _Mqtt_FaceWhiteAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  136. in := new(v1.FaceWhiteAddRequest)
  137. if err := dec(in); err != nil {
  138. return nil, err
  139. }
  140. if interceptor == nil {
  141. return srv.(MqttServer).FaceWhiteAdd(ctx, in)
  142. }
  143. info := &grpc.UnaryServerInfo{
  144. Server: srv,
  145. FullMethod: "/pb.service.Mqtt/FaceWhiteAdd",
  146. }
  147. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  148. return srv.(MqttServer).FaceWhiteAdd(ctx, req.(*v1.FaceWhiteAddRequest))
  149. }
  150. return interceptor(ctx, in, info, handler)
  151. }
  152. func _Mqtt_FaceWhiteDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  153. in := new(v1.FaceWhiteDelRequest)
  154. if err := dec(in); err != nil {
  155. return nil, err
  156. }
  157. if interceptor == nil {
  158. return srv.(MqttServer).FaceWhiteDel(ctx, in)
  159. }
  160. info := &grpc.UnaryServerInfo{
  161. Server: srv,
  162. FullMethod: "/pb.service.Mqtt/FaceWhiteDel",
  163. }
  164. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  165. return srv.(MqttServer).FaceWhiteDel(ctx, req.(*v1.FaceWhiteDelRequest))
  166. }
  167. return interceptor(ctx, in, info, handler)
  168. }
  169. func _Mqtt_FaceReboot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  170. in := new(v1.FaceRebootRequest)
  171. if err := dec(in); err != nil {
  172. return nil, err
  173. }
  174. if interceptor == nil {
  175. return srv.(MqttServer).FaceReboot(ctx, in)
  176. }
  177. info := &grpc.UnaryServerInfo{
  178. Server: srv,
  179. FullMethod: "/pb.service.Mqtt/FaceReboot",
  180. }
  181. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  182. return srv.(MqttServer).FaceReboot(ctx, req.(*v1.FaceRebootRequest))
  183. }
  184. return interceptor(ctx, in, info, handler)
  185. }
  186. func _Mqtt_FaceOpen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  187. in := new(v1.FaceOpenRequest)
  188. if err := dec(in); err != nil {
  189. return nil, err
  190. }
  191. if interceptor == nil {
  192. return srv.(MqttServer).FaceOpen(ctx, in)
  193. }
  194. info := &grpc.UnaryServerInfo{
  195. Server: srv,
  196. FullMethod: "/pb.service.Mqtt/FaceOpen",
  197. }
  198. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  199. return srv.(MqttServer).FaceOpen(ctx, req.(*v1.FaceOpenRequest))
  200. }
  201. return interceptor(ctx, in, info, handler)
  202. }
  203. func _Mqtt_NewMqttDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  204. in := new(v1.NewMqttDeviceRequest)
  205. if err := dec(in); err != nil {
  206. return nil, err
  207. }
  208. if interceptor == nil {
  209. return srv.(MqttServer).NewMqttDevice(ctx, in)
  210. }
  211. info := &grpc.UnaryServerInfo{
  212. Server: srv,
  213. FullMethod: "/pb.service.Mqtt/NewMqttDevice",
  214. }
  215. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  216. return srv.(MqttServer).NewMqttDevice(ctx, req.(*v1.NewMqttDeviceRequest))
  217. }
  218. return interceptor(ctx, in, info, handler)
  219. }
  220. var _Mqtt_serviceDesc = grpc.ServiceDesc{
  221. ServiceName: "pb.service.Mqtt",
  222. HandlerType: (*MqttServer)(nil),
  223. Methods: []grpc.MethodDesc{
  224. {
  225. MethodName: "FaceWhiteAdd",
  226. Handler: _Mqtt_FaceWhiteAdd_Handler,
  227. },
  228. {
  229. MethodName: "FaceWhiteDel",
  230. Handler: _Mqtt_FaceWhiteDel_Handler,
  231. },
  232. {
  233. MethodName: "FaceReboot",
  234. Handler: _Mqtt_FaceReboot_Handler,
  235. },
  236. {
  237. MethodName: "FaceOpen",
  238. Handler: _Mqtt_FaceOpen_Handler,
  239. },
  240. {
  241. MethodName: "NewMqttDevice",
  242. Handler: _Mqtt_NewMqttDevice_Handler,
  243. },
  244. },
  245. Streams: []grpc.StreamDesc{},
  246. Metadata: "mqtt_service.proto",
  247. }