device_service.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  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-device-gateway/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. // 267 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xdd, 0x4a, 0xc3, 0x30,
  30. 0x14, 0x80, 0x05, 0x61, 0x17, 0x07, 0xfc, 0x0b, 0x22, 0x5a, 0xab, 0x82, 0xf7, 0xeb, 0x98, 0xbe,
  31. 0x80, 0x3a, 0x41, 0x04, 0x45, 0x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x29, 0x33, 0xcb, 0x30, 0xfd, 0x64, 0xe7, 0xde, 0x92, 0x2f, 0xda,
  43. 0x68, 0x38, 0xe8, 0x9b, 0xe6, 0x5d, 0xf8, 0x1e, 0x68, 0xa3, 0x34, 0x1a, 0xaa, 0xc6, 0xee, 0xbf,
  44. 0x8f, 0x3f, 0x38, 0xe1, 0x37, 0xaf, 0x26, 0x3a, 0x49, 0x46, 0xcd, 0x1b, 0xb8, 0xfe, 0x0d, 0x00,
  45. 0x00, 0xff, 0xff, 0xc2, 0x06, 0xc6, 0xd0, 0x38, 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. GateOnline(ctx context.Context, in *v1.GateOnlineRequest, opts ...grpc.CallOption) (*v1.GateOnlineReply, error)
  59. // 门禁白名单匹配
  60. GateWhiteMatch(ctx context.Context, in *v1.GateWhiteMatchRequest, opts ...grpc.CallOption) (*v1.GateWhiteMatchReply, error)
  61. // 门禁进出记录添加
  62. GateRecordAdd(ctx context.Context, in *v1.GateRecordAddRequest, opts ...grpc.CallOption) (*v1.GateRecordAddReply, error)
  63. // 获取门禁远程命令
  64. GateCommandUse(ctx context.Context, in *v1.GateCommandUseRequest, opts ...grpc.CallOption) (*v1.GateCommandUseReply, error)
  65. // 门禁远程命令结果
  66. GateCommandResult(ctx context.Context, in *v1.GateCommandResultRequest, opts ...grpc.CallOption) (*v1.GateCommandResultReply, error)
  67. GateVisitorCheck(ctx context.Context, in *v1.GateVisitorCheckRequest, opts ...grpc.CallOption) (*v1.GateVisitorCheckReply, error)
  68. }
  69. type deviceClient struct {
  70. cc grpc.ClientConnInterface
  71. }
  72. func NewDeviceClient(cc grpc.ClientConnInterface) DeviceClient {
  73. return &deviceClient{cc}
  74. }
  75. func (c *deviceClient) GateOnline(ctx context.Context, in *v1.GateOnlineRequest, opts ...grpc.CallOption) (*v1.GateOnlineReply, error) {
  76. out := new(v1.GateOnlineReply)
  77. err := c.cc.Invoke(ctx, "/pb.service.Device/GateOnline", in, out, opts...)
  78. if err != nil {
  79. return nil, err
  80. }
  81. return out, nil
  82. }
  83. func (c *deviceClient) GateWhiteMatch(ctx context.Context, in *v1.GateWhiteMatchRequest, opts ...grpc.CallOption) (*v1.GateWhiteMatchReply, error) {
  84. out := new(v1.GateWhiteMatchReply)
  85. err := c.cc.Invoke(ctx, "/pb.service.Device/GateWhiteMatch", in, out, opts...)
  86. if err != nil {
  87. return nil, err
  88. }
  89. return out, nil
  90. }
  91. func (c *deviceClient) GateRecordAdd(ctx context.Context, in *v1.GateRecordAddRequest, opts ...grpc.CallOption) (*v1.GateRecordAddReply, error) {
  92. out := new(v1.GateRecordAddReply)
  93. err := c.cc.Invoke(ctx, "/pb.service.Device/GateRecordAdd", in, out, opts...)
  94. if err != nil {
  95. return nil, err
  96. }
  97. return out, nil
  98. }
  99. func (c *deviceClient) GateCommandUse(ctx context.Context, in *v1.GateCommandUseRequest, opts ...grpc.CallOption) (*v1.GateCommandUseReply, error) {
  100. out := new(v1.GateCommandUseReply)
  101. err := c.cc.Invoke(ctx, "/pb.service.Device/GateCommandUse", in, out, opts...)
  102. if err != nil {
  103. return nil, err
  104. }
  105. return out, nil
  106. }
  107. func (c *deviceClient) GateCommandResult(ctx context.Context, in *v1.GateCommandResultRequest, opts ...grpc.CallOption) (*v1.GateCommandResultReply, error) {
  108. out := new(v1.GateCommandResultReply)
  109. err := c.cc.Invoke(ctx, "/pb.service.Device/GateCommandResult", in, out, opts...)
  110. if err != nil {
  111. return nil, err
  112. }
  113. return out, nil
  114. }
  115. func (c *deviceClient) GateVisitorCheck(ctx context.Context, in *v1.GateVisitorCheckRequest, opts ...grpc.CallOption) (*v1.GateVisitorCheckReply, error) {
  116. out := new(v1.GateVisitorCheckReply)
  117. err := c.cc.Invoke(ctx, "/pb.service.Device/GateVisitorCheck", in, out, opts...)
  118. if err != nil {
  119. return nil, err
  120. }
  121. return out, nil
  122. }
  123. // DeviceServer is the server API for Device service.
  124. type DeviceServer interface {
  125. // 门禁在线
  126. GateOnline(context.Context, *v1.GateOnlineRequest) (*v1.GateOnlineReply, error)
  127. // 门禁白名单匹配
  128. GateWhiteMatch(context.Context, *v1.GateWhiteMatchRequest) (*v1.GateWhiteMatchReply, error)
  129. // 门禁进出记录添加
  130. GateRecordAdd(context.Context, *v1.GateRecordAddRequest) (*v1.GateRecordAddReply, error)
  131. // 获取门禁远程命令
  132. GateCommandUse(context.Context, *v1.GateCommandUseRequest) (*v1.GateCommandUseReply, error)
  133. // 门禁远程命令结果
  134. GateCommandResult(context.Context, *v1.GateCommandResultRequest) (*v1.GateCommandResultReply, error)
  135. GateVisitorCheck(context.Context, *v1.GateVisitorCheckRequest) (*v1.GateVisitorCheckReply, error)
  136. }
  137. // UnimplementedDeviceServer can be embedded to have forward compatible implementations.
  138. type UnimplementedDeviceServer struct {
  139. }
  140. func (*UnimplementedDeviceServer) GateOnline(ctx context.Context, req *v1.GateOnlineRequest) (*v1.GateOnlineReply, error) {
  141. return nil, status.Errorf(codes.Unimplemented, "method GateOnline not implemented")
  142. }
  143. func (*UnimplementedDeviceServer) GateWhiteMatch(ctx context.Context, req *v1.GateWhiteMatchRequest) (*v1.GateWhiteMatchReply, error) {
  144. return nil, status.Errorf(codes.Unimplemented, "method GateWhiteMatch not implemented")
  145. }
  146. func (*UnimplementedDeviceServer) GateRecordAdd(ctx context.Context, req *v1.GateRecordAddRequest) (*v1.GateRecordAddReply, error) {
  147. return nil, status.Errorf(codes.Unimplemented, "method GateRecordAdd not implemented")
  148. }
  149. func (*UnimplementedDeviceServer) GateCommandUse(ctx context.Context, req *v1.GateCommandUseRequest) (*v1.GateCommandUseReply, error) {
  150. return nil, status.Errorf(codes.Unimplemented, "method GateCommandUse not implemented")
  151. }
  152. func (*UnimplementedDeviceServer) GateCommandResult(ctx context.Context, req *v1.GateCommandResultRequest) (*v1.GateCommandResultReply, error) {
  153. return nil, status.Errorf(codes.Unimplemented, "method GateCommandResult not implemented")
  154. }
  155. func (*UnimplementedDeviceServer) GateVisitorCheck(ctx context.Context, req *v1.GateVisitorCheckRequest) (*v1.GateVisitorCheckReply, error) {
  156. return nil, status.Errorf(codes.Unimplemented, "method GateVisitorCheck not implemented")
  157. }
  158. func RegisterDeviceServer(s *grpc.Server, srv DeviceServer) {
  159. s.RegisterService(&_Device_serviceDesc, srv)
  160. }
  161. func _Device_GateOnline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  162. in := new(v1.GateOnlineRequest)
  163. if err := dec(in); err != nil {
  164. return nil, err
  165. }
  166. if interceptor == nil {
  167. return srv.(DeviceServer).GateOnline(ctx, in)
  168. }
  169. info := &grpc.UnaryServerInfo{
  170. Server: srv,
  171. FullMethod: "/pb.service.Device/GateOnline",
  172. }
  173. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  174. return srv.(DeviceServer).GateOnline(ctx, req.(*v1.GateOnlineRequest))
  175. }
  176. return interceptor(ctx, in, info, handler)
  177. }
  178. func _Device_GateWhiteMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  179. in := new(v1.GateWhiteMatchRequest)
  180. if err := dec(in); err != nil {
  181. return nil, err
  182. }
  183. if interceptor == nil {
  184. return srv.(DeviceServer).GateWhiteMatch(ctx, in)
  185. }
  186. info := &grpc.UnaryServerInfo{
  187. Server: srv,
  188. FullMethod: "/pb.service.Device/GateWhiteMatch",
  189. }
  190. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  191. return srv.(DeviceServer).GateWhiteMatch(ctx, req.(*v1.GateWhiteMatchRequest))
  192. }
  193. return interceptor(ctx, in, info, handler)
  194. }
  195. func _Device_GateRecordAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  196. in := new(v1.GateRecordAddRequest)
  197. if err := dec(in); err != nil {
  198. return nil, err
  199. }
  200. if interceptor == nil {
  201. return srv.(DeviceServer).GateRecordAdd(ctx, in)
  202. }
  203. info := &grpc.UnaryServerInfo{
  204. Server: srv,
  205. FullMethod: "/pb.service.Device/GateRecordAdd",
  206. }
  207. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  208. return srv.(DeviceServer).GateRecordAdd(ctx, req.(*v1.GateRecordAddRequest))
  209. }
  210. return interceptor(ctx, in, info, handler)
  211. }
  212. func _Device_GateCommandUse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  213. in := new(v1.GateCommandUseRequest)
  214. if err := dec(in); err != nil {
  215. return nil, err
  216. }
  217. if interceptor == nil {
  218. return srv.(DeviceServer).GateCommandUse(ctx, in)
  219. }
  220. info := &grpc.UnaryServerInfo{
  221. Server: srv,
  222. FullMethod: "/pb.service.Device/GateCommandUse",
  223. }
  224. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  225. return srv.(DeviceServer).GateCommandUse(ctx, req.(*v1.GateCommandUseRequest))
  226. }
  227. return interceptor(ctx, in, info, handler)
  228. }
  229. func _Device_GateCommandResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  230. in := new(v1.GateCommandResultRequest)
  231. if err := dec(in); err != nil {
  232. return nil, err
  233. }
  234. if interceptor == nil {
  235. return srv.(DeviceServer).GateCommandResult(ctx, in)
  236. }
  237. info := &grpc.UnaryServerInfo{
  238. Server: srv,
  239. FullMethod: "/pb.service.Device/GateCommandResult",
  240. }
  241. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  242. return srv.(DeviceServer).GateCommandResult(ctx, req.(*v1.GateCommandResultRequest))
  243. }
  244. return interceptor(ctx, in, info, handler)
  245. }
  246. func _Device_GateVisitorCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  247. in := new(v1.GateVisitorCheckRequest)
  248. if err := dec(in); err != nil {
  249. return nil, err
  250. }
  251. if interceptor == nil {
  252. return srv.(DeviceServer).GateVisitorCheck(ctx, in)
  253. }
  254. info := &grpc.UnaryServerInfo{
  255. Server: srv,
  256. FullMethod: "/pb.service.Device/GateVisitorCheck",
  257. }
  258. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  259. return srv.(DeviceServer).GateVisitorCheck(ctx, req.(*v1.GateVisitorCheckRequest))
  260. }
  261. return interceptor(ctx, in, info, handler)
  262. }
  263. var _Device_serviceDesc = grpc.ServiceDesc{
  264. ServiceName: "pb.service.Device",
  265. HandlerType: (*DeviceServer)(nil),
  266. Methods: []grpc.MethodDesc{
  267. {
  268. MethodName: "GateOnline",
  269. Handler: _Device_GateOnline_Handler,
  270. },
  271. {
  272. MethodName: "GateWhiteMatch",
  273. Handler: _Device_GateWhiteMatch_Handler,
  274. },
  275. {
  276. MethodName: "GateRecordAdd",
  277. Handler: _Device_GateRecordAdd_Handler,
  278. },
  279. {
  280. MethodName: "GateCommandUse",
  281. Handler: _Device_GateCommandUse_Handler,
  282. },
  283. {
  284. MethodName: "GateCommandResult",
  285. Handler: _Device_GateCommandResult_Handler,
  286. },
  287. {
  288. MethodName: "GateVisitorCheck",
  289. Handler: _Device_GateVisitorCheck_Handler,
  290. },
  291. },
  292. Streams: []grpc.StreamDesc{},
  293. Metadata: "device_service.proto",
  294. }