device_service.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: device_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("device_service.proto", fileDescriptor_5b575c291bff7431)
  26. }
  27. var fileDescriptor_5b575c291bff7431 = []byte{
  28. // 269 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xdf, 0x4a, 0xc3, 0x30,
  30. 0x14, 0x87, 0x05, 0x61, 0x17, 0x07, 0xff, 0xcc, 0x83, 0xc8, 0xac, 0x53, 0xc1, 0x7b, 0x3b, 0xa6,
  31. 0x2f, 0xa0, 0x4e, 0x26, 0x82,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6, 0xd6, 0x22, 0x18, 0x1a, 0xf1, 0x2e, 0x6a, 0xc1, 0x52, 0xcf, 0x56,
  43. 0x94, 0x7e, 0xe1, 0x85, 0x77, 0xc2, 0x17, 0xae, 0x38, 0xee, 0xf5, 0x6d, 0xf3, 0x01, 0x3f, 0x87,
  44. 0x4a, 0x4b, 0x45, 0x9a, 0x37, 0xd7, 0x45, 0xc5, 0x3c, 0x51, 0x49, 0x32, 0x68, 0xdf, 0xfc, 0xf6,
  45. 0x27, 0x00, 0x00, 0xff, 0xff, 0x3d, 0xba, 0xeb, 0x34, 0x28, 0x02, 0x00, 0x00,
  46. }
  47. // Reference imports to suppress errors if they are not otherwise used.
  48. var _ context.Context
  49. var _ grpc.ClientConnInterface
  50. // This is a compile-time assertion to ensure that this generated file
  51. // is compatible with the grpc package it is being compiled against.
  52. const _ = grpc.SupportPackageIsVersion6
  53. // DeviceClient is the client API for Device service.
  54. //
  55. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  56. type DeviceClient interface {
  57. // 门禁远程命令结果
  58. GateCommandResult(ctx context.Context, in *v1.GateCommandResultRequest, opts ...grpc.CallOption) (*v1.GateCommandResultReply, error)
  59. // 门禁在线
  60. GateOnline(ctx context.Context, in *v1.GateOnlineRequest, opts ...grpc.CallOption) (*v1.GateOnlineReply, error)
  61. // 门禁进出记录添加
  62. GateRecordAdd(ctx context.Context, in *v1.GateRecordAddRequest, opts ...grpc.CallOption) (*v1.GateRecordAddReply, error)
  63. // 人脸门禁所有id
  64. MqttFaceGate(ctx context.Context, in *v1.MqttFaceGateRequest, opts ...grpc.CallOption) (*v1.MqttFaceGateReply, error)
  65. // 门禁白名单匹配
  66. GateWhiteMatch(ctx context.Context, in *v1.GateWhiteMatchRequest, opts ...grpc.CallOption) (*v1.GateWhiteMatchReply, error)
  67. // 访客检查
  68. GateVisitorCheck(ctx context.Context, in *v1.GateVisitorCheckRequest, opts ...grpc.CallOption) (*v1.GateVisitorCheckReply, error)
  69. }
  70. type deviceClient struct {
  71. cc grpc.ClientConnInterface
  72. }
  73. func NewDeviceClient(cc grpc.ClientConnInterface) DeviceClient {
  74. return &deviceClient{cc}
  75. }
  76. func (c *deviceClient) GateCommandResult(ctx context.Context, in *v1.GateCommandResultRequest, opts ...grpc.CallOption) (*v1.GateCommandResultReply, error) {
  77. out := new(v1.GateCommandResultReply)
  78. err := c.cc.Invoke(ctx, "/pb.service.Device/GateCommandResult", in, out, opts...)
  79. if err != nil {
  80. return nil, err
  81. }
  82. return out, nil
  83. }
  84. func (c *deviceClient) GateOnline(ctx context.Context, in *v1.GateOnlineRequest, opts ...grpc.CallOption) (*v1.GateOnlineReply, error) {
  85. out := new(v1.GateOnlineReply)
  86. err := c.cc.Invoke(ctx, "/pb.service.Device/GateOnline", in, out, opts...)
  87. if err != nil {
  88. return nil, err
  89. }
  90. return out, nil
  91. }
  92. func (c *deviceClient) GateRecordAdd(ctx context.Context, in *v1.GateRecordAddRequest, opts ...grpc.CallOption) (*v1.GateRecordAddReply, error) {
  93. out := new(v1.GateRecordAddReply)
  94. err := c.cc.Invoke(ctx, "/pb.service.Device/GateRecordAdd", in, out, opts...)
  95. if err != nil {
  96. return nil, err
  97. }
  98. return out, nil
  99. }
  100. func (c *deviceClient) MqttFaceGate(ctx context.Context, in *v1.MqttFaceGateRequest, opts ...grpc.CallOption) (*v1.MqttFaceGateReply, error) {
  101. out := new(v1.MqttFaceGateReply)
  102. err := c.cc.Invoke(ctx, "/pb.service.Device/MqttFaceGate", in, out, opts...)
  103. if err != nil {
  104. return nil, err
  105. }
  106. return out, nil
  107. }
  108. func (c *deviceClient) GateWhiteMatch(ctx context.Context, in *v1.GateWhiteMatchRequest, opts ...grpc.CallOption) (*v1.GateWhiteMatchReply, error) {
  109. out := new(v1.GateWhiteMatchReply)
  110. err := c.cc.Invoke(ctx, "/pb.service.Device/GateWhiteMatch", in, out, opts...)
  111. if err != nil {
  112. return nil, err
  113. }
  114. return out, nil
  115. }
  116. func (c *deviceClient) GateVisitorCheck(ctx context.Context, in *v1.GateVisitorCheckRequest, opts ...grpc.CallOption) (*v1.GateVisitorCheckReply, error) {
  117. out := new(v1.GateVisitorCheckReply)
  118. err := c.cc.Invoke(ctx, "/pb.service.Device/GateVisitorCheck", in, out, opts...)
  119. if err != nil {
  120. return nil, err
  121. }
  122. return out, nil
  123. }
  124. // DeviceServer is the server API for Device service.
  125. type DeviceServer interface {
  126. // 门禁远程命令结果
  127. GateCommandResult(context.Context, *v1.GateCommandResultRequest) (*v1.GateCommandResultReply, error)
  128. // 门禁在线
  129. GateOnline(context.Context, *v1.GateOnlineRequest) (*v1.GateOnlineReply, error)
  130. // 门禁进出记录添加
  131. GateRecordAdd(context.Context, *v1.GateRecordAddRequest) (*v1.GateRecordAddReply, error)
  132. // 人脸门禁所有id
  133. MqttFaceGate(context.Context, *v1.MqttFaceGateRequest) (*v1.MqttFaceGateReply, error)
  134. // 门禁白名单匹配
  135. GateWhiteMatch(context.Context, *v1.GateWhiteMatchRequest) (*v1.GateWhiteMatchReply, error)
  136. // 访客检查
  137. GateVisitorCheck(context.Context, *v1.GateVisitorCheckRequest) (*v1.GateVisitorCheckReply, error)
  138. }
  139. // UnimplementedDeviceServer can be embedded to have forward compatible implementations.
  140. type UnimplementedDeviceServer struct {
  141. }
  142. func (*UnimplementedDeviceServer) GateCommandResult(ctx context.Context, req *v1.GateCommandResultRequest) (*v1.GateCommandResultReply, error) {
  143. return nil, status.Errorf(codes.Unimplemented, "method GateCommandResult not implemented")
  144. }
  145. func (*UnimplementedDeviceServer) GateOnline(ctx context.Context, req *v1.GateOnlineRequest) (*v1.GateOnlineReply, error) {
  146. return nil, status.Errorf(codes.Unimplemented, "method GateOnline not implemented")
  147. }
  148. func (*UnimplementedDeviceServer) GateRecordAdd(ctx context.Context, req *v1.GateRecordAddRequest) (*v1.GateRecordAddReply, error) {
  149. return nil, status.Errorf(codes.Unimplemented, "method GateRecordAdd not implemented")
  150. }
  151. func (*UnimplementedDeviceServer) MqttFaceGate(ctx context.Context, req *v1.MqttFaceGateRequest) (*v1.MqttFaceGateReply, error) {
  152. return nil, status.Errorf(codes.Unimplemented, "method MqttFaceGate not implemented")
  153. }
  154. func (*UnimplementedDeviceServer) GateWhiteMatch(ctx context.Context, req *v1.GateWhiteMatchRequest) (*v1.GateWhiteMatchReply, error) {
  155. return nil, status.Errorf(codes.Unimplemented, "method GateWhiteMatch not implemented")
  156. }
  157. func (*UnimplementedDeviceServer) GateVisitorCheck(ctx context.Context, req *v1.GateVisitorCheckRequest) (*v1.GateVisitorCheckReply, error) {
  158. return nil, status.Errorf(codes.Unimplemented, "method GateVisitorCheck not implemented")
  159. }
  160. func RegisterDeviceServer(s *grpc.Server, srv DeviceServer) {
  161. s.RegisterService(&_Device_serviceDesc, srv)
  162. }
  163. func _Device_GateCommandResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  164. in := new(v1.GateCommandResultRequest)
  165. if err := dec(in); err != nil {
  166. return nil, err
  167. }
  168. if interceptor == nil {
  169. return srv.(DeviceServer).GateCommandResult(ctx, in)
  170. }
  171. info := &grpc.UnaryServerInfo{
  172. Server: srv,
  173. FullMethod: "/pb.service.Device/GateCommandResult",
  174. }
  175. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  176. return srv.(DeviceServer).GateCommandResult(ctx, req.(*v1.GateCommandResultRequest))
  177. }
  178. return interceptor(ctx, in, info, handler)
  179. }
  180. func _Device_GateOnline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  181. in := new(v1.GateOnlineRequest)
  182. if err := dec(in); err != nil {
  183. return nil, err
  184. }
  185. if interceptor == nil {
  186. return srv.(DeviceServer).GateOnline(ctx, in)
  187. }
  188. info := &grpc.UnaryServerInfo{
  189. Server: srv,
  190. FullMethod: "/pb.service.Device/GateOnline",
  191. }
  192. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  193. return srv.(DeviceServer).GateOnline(ctx, req.(*v1.GateOnlineRequest))
  194. }
  195. return interceptor(ctx, in, info, handler)
  196. }
  197. func _Device_GateRecordAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  198. in := new(v1.GateRecordAddRequest)
  199. if err := dec(in); err != nil {
  200. return nil, err
  201. }
  202. if interceptor == nil {
  203. return srv.(DeviceServer).GateRecordAdd(ctx, in)
  204. }
  205. info := &grpc.UnaryServerInfo{
  206. Server: srv,
  207. FullMethod: "/pb.service.Device/GateRecordAdd",
  208. }
  209. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  210. return srv.(DeviceServer).GateRecordAdd(ctx, req.(*v1.GateRecordAddRequest))
  211. }
  212. return interceptor(ctx, in, info, handler)
  213. }
  214. func _Device_MqttFaceGate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  215. in := new(v1.MqttFaceGateRequest)
  216. if err := dec(in); err != nil {
  217. return nil, err
  218. }
  219. if interceptor == nil {
  220. return srv.(DeviceServer).MqttFaceGate(ctx, in)
  221. }
  222. info := &grpc.UnaryServerInfo{
  223. Server: srv,
  224. FullMethod: "/pb.service.Device/MqttFaceGate",
  225. }
  226. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  227. return srv.(DeviceServer).MqttFaceGate(ctx, req.(*v1.MqttFaceGateRequest))
  228. }
  229. return interceptor(ctx, in, info, handler)
  230. }
  231. func _Device_GateWhiteMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  232. in := new(v1.GateWhiteMatchRequest)
  233. if err := dec(in); err != nil {
  234. return nil, err
  235. }
  236. if interceptor == nil {
  237. return srv.(DeviceServer).GateWhiteMatch(ctx, in)
  238. }
  239. info := &grpc.UnaryServerInfo{
  240. Server: srv,
  241. FullMethod: "/pb.service.Device/GateWhiteMatch",
  242. }
  243. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  244. return srv.(DeviceServer).GateWhiteMatch(ctx, req.(*v1.GateWhiteMatchRequest))
  245. }
  246. return interceptor(ctx, in, info, handler)
  247. }
  248. func _Device_GateVisitorCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  249. in := new(v1.GateVisitorCheckRequest)
  250. if err := dec(in); err != nil {
  251. return nil, err
  252. }
  253. if interceptor == nil {
  254. return srv.(DeviceServer).GateVisitorCheck(ctx, in)
  255. }
  256. info := &grpc.UnaryServerInfo{
  257. Server: srv,
  258. FullMethod: "/pb.service.Device/GateVisitorCheck",
  259. }
  260. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  261. return srv.(DeviceServer).GateVisitorCheck(ctx, req.(*v1.GateVisitorCheckRequest))
  262. }
  263. return interceptor(ctx, in, info, handler)
  264. }
  265. var _Device_serviceDesc = grpc.ServiceDesc{
  266. ServiceName: "pb.service.Device",
  267. HandlerType: (*DeviceServer)(nil),
  268. Methods: []grpc.MethodDesc{
  269. {
  270. MethodName: "GateCommandResult",
  271. Handler: _Device_GateCommandResult_Handler,
  272. },
  273. {
  274. MethodName: "GateOnline",
  275. Handler: _Device_GateOnline_Handler,
  276. },
  277. {
  278. MethodName: "GateRecordAdd",
  279. Handler: _Device_GateRecordAdd_Handler,
  280. },
  281. {
  282. MethodName: "MqttFaceGate",
  283. Handler: _Device_MqttFaceGate_Handler,
  284. },
  285. {
  286. MethodName: "GateWhiteMatch",
  287. Handler: _Device_GateWhiteMatch_Handler,
  288. },
  289. {
  290. MethodName: "GateVisitorCheck",
  291. Handler: _Device_GateVisitorCheck_Handler,
  292. },
  293. },
  294. Streams: []grpc.StreamDesc{},
  295. Metadata: "device_service.proto",
  296. }