device_service.pb.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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-household-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. // 246 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4b, 0xc3, 0x30,
  30. 0x14, 0x80, 0x05, 0x61, 0x48, 0x0e, 0x0e, 0xc2, 0xf0, 0x50, 0x1d, 0x82, 0xf7, 0x65, 0x4c, 0x6f,
  31. 0xde, 0x94, 0x81, 0x08, 0x03, 0x45, 0xd0, 0x83, 0x97, 0xd2, 0x34, 0x4f, 0x1b, 0x28, 0x4d, 0x4c,
  32. 0x5e, 0x2b, 0xfd, 0x97, 0xfe, 0x24, 0x69, 0xda, 0xae, 0x09, 0x6d, 0x4f, 0x81, 0xef, 0x7b, 0x79,
  33. 0x7c, 0xf0, 0xc8, 0x4a, 0x40, 0x25, 0x53, 0x88, 0x2d, 0x98, 0xe6, 0x65, 0xda, 0x28, 0x54, 0x94,
  34. 0x68, 0xce, 0x3a, 0x12, 0x2d, 0xab, 0xdd, 0xb6, 0x1d, 0x6a, 0xe5, 0xed, 0xdf, 0x29, 0x59, 0xec,
  35. 0x1d, 0xa0, 0xf7, 0xe4, 0xec, 0x29, 0x41, 0x38, 0x48, 0x8b, 0xf4, 0x82, 0x69, 0x1e, 0x57, 0x3b,
  36. 0xd6, 0x83, 0x37, 0xf8, 0x29, 0xc1, 0x62, 0xb4, 0x1a, 0x71, 0x9d, 0xd7, 0x37, 0x27, 0xf4, 0x40,
  37. 0xce, 0x1b, 0xf4, 0x21, 0xad, 0x44, 0x65, 0xf6, 0x90, 0xd3, 0x2b, 0x6f, 0x72, 0xc0, 0xfd, 0x9e,
  38. 0x68, 0xc6, 0xb6, 0xdb, 0x5e, 0xc8, 0xd2, 0x13, 0x2e, 0x68, 0x3d, 0xfe, 0xe0, 0x77, 0x5d, 0xce,
  39. 0xe9, 0x20, 0xef, 0xdd, 0x82, 0x79, 0x95, 0xe9, 0x83, 0x10, 0x41, 0xde, 0x80, 0xa7, 0xf2, 0x7c,
  40. 0x1b, 0xe4, 0x75, 0xe2, 0xb9, 0xf8, 0x52, 0x41, 0x9e, 0xc7, 0xa7, 0xf2, 0x02, 0x1d, 0xe6, 0x15,
  41. 0x12, 0xbb, 0x5b, 0x04, 0x79, 0x47, 0x3c, 0x99, 0xe7, 0x59, 0xb7, 0xed, 0xf1, 0xfa, 0x73, 0xad,
  42. 0x8d, 0xd2, 0x60, 0xb0, 0xde, 0x64, 0xaa, 0xb4, 0x90, 0xa9, 0x5c, 0x6c, 0xbe, 0x13, 0x84, 0xdf,
  43. 0xa4, 0xde, 0x6a, 0xce, 0x17, 0xee, 0xf4, 0x77, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd5, 0xcf,
  44. 0x27, 0x7b, 0x2f, 0x02, 0x00, 0x00,
  45. }
  46. // Reference imports to suppress errors if they are not otherwise used.
  47. var _ context.Context
  48. var _ grpc.ClientConnInterface
  49. // This is a compile-time assertion to ensure that this generated file
  50. // is compatible with the grpc package it is being compiled against.
  51. const _ = grpc.SupportPackageIsVersion6
  52. // DeviceClient is the client API for Device service.
  53. //
  54. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  55. type DeviceClient interface {
  56. // 门禁列表
  57. GateList(ctx context.Context, in *v1.GateListRequest, opts ...grpc.CallOption) (*v1.GateListReply, error)
  58. GateVisitorDel(ctx context.Context, in *v1.GateVisitorDelRequest, opts ...grpc.CallOption) (*v1.GateVisitorDelReply, error)
  59. GateVisitorList(ctx context.Context, in *v1.GateVisitorListRequest, opts ...grpc.CallOption) (*v1.GateVisitorListReply, error)
  60. // 门禁人脸申请
  61. GateUserPicAdd(ctx context.Context, in *v1.GateUserPicAddRequest, opts ...grpc.CallOption) (*v1.GateUserPicAddReply, error)
  62. // 获取人脸录入信息
  63. GateUserPicInfo(ctx context.Context, in *v1.GateUserPicInfoRequest, opts ...grpc.CallOption) (*v1.GateUserPicInfoReply, error)
  64. // 获取绑定了某单元的门禁列表
  65. GateUnitDevice(ctx context.Context, in *v1.GateUnitDeviceRequest, opts ...grpc.CallOption) (*v1.GateUnitDeviceReply, error)
  66. }
  67. type deviceClient struct {
  68. cc grpc.ClientConnInterface
  69. }
  70. func NewDeviceClient(cc grpc.ClientConnInterface) DeviceClient {
  71. return &deviceClient{cc}
  72. }
  73. func (c *deviceClient) GateList(ctx context.Context, in *v1.GateListRequest, opts ...grpc.CallOption) (*v1.GateListReply, error) {
  74. out := new(v1.GateListReply)
  75. err := c.cc.Invoke(ctx, "/pb.service.Device/GateList", in, out, opts...)
  76. if err != nil {
  77. return nil, err
  78. }
  79. return out, nil
  80. }
  81. func (c *deviceClient) GateVisitorDel(ctx context.Context, in *v1.GateVisitorDelRequest, opts ...grpc.CallOption) (*v1.GateVisitorDelReply, error) {
  82. out := new(v1.GateVisitorDelReply)
  83. err := c.cc.Invoke(ctx, "/pb.service.Device/GateVisitorDel", in, out, opts...)
  84. if err != nil {
  85. return nil, err
  86. }
  87. return out, nil
  88. }
  89. func (c *deviceClient) GateVisitorList(ctx context.Context, in *v1.GateVisitorListRequest, opts ...grpc.CallOption) (*v1.GateVisitorListReply, error) {
  90. out := new(v1.GateVisitorListReply)
  91. err := c.cc.Invoke(ctx, "/pb.service.Device/GateVisitorList", in, out, opts...)
  92. if err != nil {
  93. return nil, err
  94. }
  95. return out, nil
  96. }
  97. func (c *deviceClient) GateUserPicAdd(ctx context.Context, in *v1.GateUserPicAddRequest, opts ...grpc.CallOption) (*v1.GateUserPicAddReply, error) {
  98. out := new(v1.GateUserPicAddReply)
  99. err := c.cc.Invoke(ctx, "/pb.service.Device/GateUserPicAdd", in, out, opts...)
  100. if err != nil {
  101. return nil, err
  102. }
  103. return out, nil
  104. }
  105. func (c *deviceClient) GateUserPicInfo(ctx context.Context, in *v1.GateUserPicInfoRequest, opts ...grpc.CallOption) (*v1.GateUserPicInfoReply, error) {
  106. out := new(v1.GateUserPicInfoReply)
  107. err := c.cc.Invoke(ctx, "/pb.service.Device/GateUserPicInfo", in, out, opts...)
  108. if err != nil {
  109. return nil, err
  110. }
  111. return out, nil
  112. }
  113. func (c *deviceClient) GateUnitDevice(ctx context.Context, in *v1.GateUnitDeviceRequest, opts ...grpc.CallOption) (*v1.GateUnitDeviceReply, error) {
  114. out := new(v1.GateUnitDeviceReply)
  115. err := c.cc.Invoke(ctx, "/pb.service.Device/GateUnitDevice", in, out, opts...)
  116. if err != nil {
  117. return nil, err
  118. }
  119. return out, nil
  120. }
  121. // DeviceServer is the server API for Device service.
  122. type DeviceServer interface {
  123. // 门禁列表
  124. GateList(context.Context, *v1.GateListRequest) (*v1.GateListReply, error)
  125. GateVisitorDel(context.Context, *v1.GateVisitorDelRequest) (*v1.GateVisitorDelReply, error)
  126. GateVisitorList(context.Context, *v1.GateVisitorListRequest) (*v1.GateVisitorListReply, error)
  127. // 门禁人脸申请
  128. GateUserPicAdd(context.Context, *v1.GateUserPicAddRequest) (*v1.GateUserPicAddReply, error)
  129. // 获取人脸录入信息
  130. GateUserPicInfo(context.Context, *v1.GateUserPicInfoRequest) (*v1.GateUserPicInfoReply, error)
  131. // 获取绑定了某单元的门禁列表
  132. GateUnitDevice(context.Context, *v1.GateUnitDeviceRequest) (*v1.GateUnitDeviceReply, error)
  133. }
  134. // UnimplementedDeviceServer can be embedded to have forward compatible implementations.
  135. type UnimplementedDeviceServer struct {
  136. }
  137. func (*UnimplementedDeviceServer) GateList(ctx context.Context, req *v1.GateListRequest) (*v1.GateListReply, error) {
  138. return nil, status.Errorf(codes.Unimplemented, "method GateList not implemented")
  139. }
  140. func (*UnimplementedDeviceServer) GateVisitorDel(ctx context.Context, req *v1.GateVisitorDelRequest) (*v1.GateVisitorDelReply, error) {
  141. return nil, status.Errorf(codes.Unimplemented, "method GateVisitorDel not implemented")
  142. }
  143. func (*UnimplementedDeviceServer) GateVisitorList(ctx context.Context, req *v1.GateVisitorListRequest) (*v1.GateVisitorListReply, error) {
  144. return nil, status.Errorf(codes.Unimplemented, "method GateVisitorList not implemented")
  145. }
  146. func (*UnimplementedDeviceServer) GateUserPicAdd(ctx context.Context, req *v1.GateUserPicAddRequest) (*v1.GateUserPicAddReply, error) {
  147. return nil, status.Errorf(codes.Unimplemented, "method GateUserPicAdd not implemented")
  148. }
  149. func (*UnimplementedDeviceServer) GateUserPicInfo(ctx context.Context, req *v1.GateUserPicInfoRequest) (*v1.GateUserPicInfoReply, error) {
  150. return nil, status.Errorf(codes.Unimplemented, "method GateUserPicInfo not implemented")
  151. }
  152. func (*UnimplementedDeviceServer) GateUnitDevice(ctx context.Context, req *v1.GateUnitDeviceRequest) (*v1.GateUnitDeviceReply, error) {
  153. return nil, status.Errorf(codes.Unimplemented, "method GateUnitDevice not implemented")
  154. }
  155. func RegisterDeviceServer(s *grpc.Server, srv DeviceServer) {
  156. s.RegisterService(&_Device_serviceDesc, srv)
  157. }
  158. func _Device_GateList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  159. in := new(v1.GateListRequest)
  160. if err := dec(in); err != nil {
  161. return nil, err
  162. }
  163. if interceptor == nil {
  164. return srv.(DeviceServer).GateList(ctx, in)
  165. }
  166. info := &grpc.UnaryServerInfo{
  167. Server: srv,
  168. FullMethod: "/pb.service.Device/GateList",
  169. }
  170. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  171. return srv.(DeviceServer).GateList(ctx, req.(*v1.GateListRequest))
  172. }
  173. return interceptor(ctx, in, info, handler)
  174. }
  175. func _Device_GateVisitorDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  176. in := new(v1.GateVisitorDelRequest)
  177. if err := dec(in); err != nil {
  178. return nil, err
  179. }
  180. if interceptor == nil {
  181. return srv.(DeviceServer).GateVisitorDel(ctx, in)
  182. }
  183. info := &grpc.UnaryServerInfo{
  184. Server: srv,
  185. FullMethod: "/pb.service.Device/GateVisitorDel",
  186. }
  187. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  188. return srv.(DeviceServer).GateVisitorDel(ctx, req.(*v1.GateVisitorDelRequest))
  189. }
  190. return interceptor(ctx, in, info, handler)
  191. }
  192. func _Device_GateVisitorList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  193. in := new(v1.GateVisitorListRequest)
  194. if err := dec(in); err != nil {
  195. return nil, err
  196. }
  197. if interceptor == nil {
  198. return srv.(DeviceServer).GateVisitorList(ctx, in)
  199. }
  200. info := &grpc.UnaryServerInfo{
  201. Server: srv,
  202. FullMethod: "/pb.service.Device/GateVisitorList",
  203. }
  204. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  205. return srv.(DeviceServer).GateVisitorList(ctx, req.(*v1.GateVisitorListRequest))
  206. }
  207. return interceptor(ctx, in, info, handler)
  208. }
  209. func _Device_GateUserPicAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  210. in := new(v1.GateUserPicAddRequest)
  211. if err := dec(in); err != nil {
  212. return nil, err
  213. }
  214. if interceptor == nil {
  215. return srv.(DeviceServer).GateUserPicAdd(ctx, in)
  216. }
  217. info := &grpc.UnaryServerInfo{
  218. Server: srv,
  219. FullMethod: "/pb.service.Device/GateUserPicAdd",
  220. }
  221. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  222. return srv.(DeviceServer).GateUserPicAdd(ctx, req.(*v1.GateUserPicAddRequest))
  223. }
  224. return interceptor(ctx, in, info, handler)
  225. }
  226. func _Device_GateUserPicInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  227. in := new(v1.GateUserPicInfoRequest)
  228. if err := dec(in); err != nil {
  229. return nil, err
  230. }
  231. if interceptor == nil {
  232. return srv.(DeviceServer).GateUserPicInfo(ctx, in)
  233. }
  234. info := &grpc.UnaryServerInfo{
  235. Server: srv,
  236. FullMethod: "/pb.service.Device/GateUserPicInfo",
  237. }
  238. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  239. return srv.(DeviceServer).GateUserPicInfo(ctx, req.(*v1.GateUserPicInfoRequest))
  240. }
  241. return interceptor(ctx, in, info, handler)
  242. }
  243. func _Device_GateUnitDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  244. in := new(v1.GateUnitDeviceRequest)
  245. if err := dec(in); err != nil {
  246. return nil, err
  247. }
  248. if interceptor == nil {
  249. return srv.(DeviceServer).GateUnitDevice(ctx, in)
  250. }
  251. info := &grpc.UnaryServerInfo{
  252. Server: srv,
  253. FullMethod: "/pb.service.Device/GateUnitDevice",
  254. }
  255. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  256. return srv.(DeviceServer).GateUnitDevice(ctx, req.(*v1.GateUnitDeviceRequest))
  257. }
  258. return interceptor(ctx, in, info, handler)
  259. }
  260. var _Device_serviceDesc = grpc.ServiceDesc{
  261. ServiceName: "pb.service.Device",
  262. HandlerType: (*DeviceServer)(nil),
  263. Methods: []grpc.MethodDesc{
  264. {
  265. MethodName: "GateList",
  266. Handler: _Device_GateList_Handler,
  267. },
  268. {
  269. MethodName: "GateVisitorDel",
  270. Handler: _Device_GateVisitorDel_Handler,
  271. },
  272. {
  273. MethodName: "GateVisitorList",
  274. Handler: _Device_GateVisitorList_Handler,
  275. },
  276. {
  277. MethodName: "GateUserPicAdd",
  278. Handler: _Device_GateUserPicAdd_Handler,
  279. },
  280. {
  281. MethodName: "GateUserPicInfo",
  282. Handler: _Device_GateUserPicInfo_Handler,
  283. },
  284. {
  285. MethodName: "GateUnitDevice",
  286. Handler: _Device_GateUnitDevice_Handler,
  287. },
  288. },
  289. Streams: []grpc.StreamDesc{},
  290. Metadata: "device_service.proto",
  291. }