123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: device_service.proto
- // package声明符,用来防止不同的消息类型有命名冲突
- package pb
- import (
- context "context"
- fmt "fmt"
- proto "github.com/golang/protobuf/proto"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- math "math"
- v1 "property-device-gateway/pb/v1"
- )
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
- func init() {
- proto.RegisterFile("device_service.proto", fileDescriptor_5b575c291bff7431)
- }
- var fileDescriptor_5b575c291bff7431 = []byte{
- // 267 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xdd, 0x4a, 0xc3, 0x30,
- 0x14, 0x80, 0x05, 0x61, 0x17, 0x07, 0xfc, 0x0b, 0x22, 0x5a, 0xab, 0x82, 0xf7, 0xeb, 0x98, 0xbe,
- 0x80, 0x3a, 0x41, 0x04, 0x45, 0x28, 0x4c, 0xc1, 0x9b, 0x91, 0x36, 0x07, 0x1b, 0xec, 0x9a, 0x98,
- 0x9c, 0x55, 0xf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f8, 0x1e, 0x68, 0xa3, 0x34, 0x1a, 0xaa, 0xc6, 0xee, 0xbf,
- 0x8f, 0x3f, 0x38, 0xe1, 0x37, 0xaf, 0x26, 0x3a, 0x49, 0x46, 0xcd, 0x1b, 0xb8, 0xfe, 0x0d, 0x00,
- 0x00, 0xff, 0xff, 0xc2, 0x06, 0xc6, 0xd0, 0x38, 0x02, 0x00, 0x00,
- }
- // Reference imports to suppress errors if they are not otherwise used.
- var _ context.Context
- var _ grpc.ClientConnInterface
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- const _ = grpc.SupportPackageIsVersion6
- // DeviceClient is the client API for Device service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type DeviceClient interface {
- // 门禁在线
- GateOnline(ctx context.Context, in *v1.GateOnlineRequest, opts ...grpc.CallOption) (*v1.GateOnlineReply, error)
- // 门禁白名单匹配
- GateWhiteMatch(ctx context.Context, in *v1.GateWhiteMatchRequest, opts ...grpc.CallOption) (*v1.GateWhiteMatchReply, error)
- // 门禁进出记录添加
- GateRecordAdd(ctx context.Context, in *v1.GateRecordAddRequest, opts ...grpc.CallOption) (*v1.GateRecordAddReply, error)
- // 获取门禁远程命令
- GateCommandUse(ctx context.Context, in *v1.GateCommandUseRequest, opts ...grpc.CallOption) (*v1.GateCommandUseReply, error)
- // 门禁远程命令结果
- GateCommandResult(ctx context.Context, in *v1.GateCommandResultRequest, opts ...grpc.CallOption) (*v1.GateCommandResultReply, error)
- GateVisitorCheck(ctx context.Context, in *v1.GateVisitorCheckRequest, opts ...grpc.CallOption) (*v1.GateVisitorCheckReply, error)
- }
- type deviceClient struct {
- cc grpc.ClientConnInterface
- }
- func NewDeviceClient(cc grpc.ClientConnInterface) DeviceClient {
- return &deviceClient{cc}
- }
- func (c *deviceClient) GateOnline(ctx context.Context, in *v1.GateOnlineRequest, opts ...grpc.CallOption) (*v1.GateOnlineReply, error) {
- out := new(v1.GateOnlineReply)
- err := c.cc.Invoke(ctx, "/pb.service.Device/GateOnline", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *deviceClient) GateWhiteMatch(ctx context.Context, in *v1.GateWhiteMatchRequest, opts ...grpc.CallOption) (*v1.GateWhiteMatchReply, error) {
- out := new(v1.GateWhiteMatchReply)
- err := c.cc.Invoke(ctx, "/pb.service.Device/GateWhiteMatch", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *deviceClient) GateRecordAdd(ctx context.Context, in *v1.GateRecordAddRequest, opts ...grpc.CallOption) (*v1.GateRecordAddReply, error) {
- out := new(v1.GateRecordAddReply)
- err := c.cc.Invoke(ctx, "/pb.service.Device/GateRecordAdd", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *deviceClient) GateCommandUse(ctx context.Context, in *v1.GateCommandUseRequest, opts ...grpc.CallOption) (*v1.GateCommandUseReply, error) {
- out := new(v1.GateCommandUseReply)
- err := c.cc.Invoke(ctx, "/pb.service.Device/GateCommandUse", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *deviceClient) GateCommandResult(ctx context.Context, in *v1.GateCommandResultRequest, opts ...grpc.CallOption) (*v1.GateCommandResultReply, error) {
- out := new(v1.GateCommandResultReply)
- err := c.cc.Invoke(ctx, "/pb.service.Device/GateCommandResult", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *deviceClient) GateVisitorCheck(ctx context.Context, in *v1.GateVisitorCheckRequest, opts ...grpc.CallOption) (*v1.GateVisitorCheckReply, error) {
- out := new(v1.GateVisitorCheckReply)
- err := c.cc.Invoke(ctx, "/pb.service.Device/GateVisitorCheck", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // DeviceServer is the server API for Device service.
- type DeviceServer interface {
- // 门禁在线
- GateOnline(context.Context, *v1.GateOnlineRequest) (*v1.GateOnlineReply, error)
- // 门禁白名单匹配
- GateWhiteMatch(context.Context, *v1.GateWhiteMatchRequest) (*v1.GateWhiteMatchReply, error)
- // 门禁进出记录添加
- GateRecordAdd(context.Context, *v1.GateRecordAddRequest) (*v1.GateRecordAddReply, error)
- // 获取门禁远程命令
- GateCommandUse(context.Context, *v1.GateCommandUseRequest) (*v1.GateCommandUseReply, error)
- // 门禁远程命令结果
- GateCommandResult(context.Context, *v1.GateCommandResultRequest) (*v1.GateCommandResultReply, error)
- GateVisitorCheck(context.Context, *v1.GateVisitorCheckRequest) (*v1.GateVisitorCheckReply, error)
- }
- // UnimplementedDeviceServer can be embedded to have forward compatible implementations.
- type UnimplementedDeviceServer struct {
- }
- func (*UnimplementedDeviceServer) GateOnline(ctx context.Context, req *v1.GateOnlineRequest) (*v1.GateOnlineReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GateOnline not implemented")
- }
- func (*UnimplementedDeviceServer) GateWhiteMatch(ctx context.Context, req *v1.GateWhiteMatchRequest) (*v1.GateWhiteMatchReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GateWhiteMatch not implemented")
- }
- func (*UnimplementedDeviceServer) GateRecordAdd(ctx context.Context, req *v1.GateRecordAddRequest) (*v1.GateRecordAddReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GateRecordAdd not implemented")
- }
- func (*UnimplementedDeviceServer) GateCommandUse(ctx context.Context, req *v1.GateCommandUseRequest) (*v1.GateCommandUseReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GateCommandUse not implemented")
- }
- func (*UnimplementedDeviceServer) GateCommandResult(ctx context.Context, req *v1.GateCommandResultRequest) (*v1.GateCommandResultReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GateCommandResult not implemented")
- }
- func (*UnimplementedDeviceServer) GateVisitorCheck(ctx context.Context, req *v1.GateVisitorCheckRequest) (*v1.GateVisitorCheckReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GateVisitorCheck not implemented")
- }
- func RegisterDeviceServer(s *grpc.Server, srv DeviceServer) {
- s.RegisterService(&_Device_serviceDesc, srv)
- }
- func _Device_GateOnline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.GateOnlineRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DeviceServer).GateOnline(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Device/GateOnline",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DeviceServer).GateOnline(ctx, req.(*v1.GateOnlineRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Device_GateWhiteMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.GateWhiteMatchRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DeviceServer).GateWhiteMatch(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Device/GateWhiteMatch",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DeviceServer).GateWhiteMatch(ctx, req.(*v1.GateWhiteMatchRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Device_GateRecordAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.GateRecordAddRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DeviceServer).GateRecordAdd(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Device/GateRecordAdd",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DeviceServer).GateRecordAdd(ctx, req.(*v1.GateRecordAddRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Device_GateCommandUse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.GateCommandUseRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DeviceServer).GateCommandUse(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Device/GateCommandUse",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DeviceServer).GateCommandUse(ctx, req.(*v1.GateCommandUseRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Device_GateCommandResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.GateCommandResultRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DeviceServer).GateCommandResult(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Device/GateCommandResult",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DeviceServer).GateCommandResult(ctx, req.(*v1.GateCommandResultRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _Device_GateVisitorCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(v1.GateVisitorCheckRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(DeviceServer).GateVisitorCheck(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/pb.service.Device/GateVisitorCheck",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(DeviceServer).GateVisitorCheck(ctx, req.(*v1.GateVisitorCheckRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _Device_serviceDesc = grpc.ServiceDesc{
- ServiceName: "pb.service.Device",
- HandlerType: (*DeviceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "GateOnline",
- Handler: _Device_GateOnline_Handler,
- },
- {
- MethodName: "GateWhiteMatch",
- Handler: _Device_GateWhiteMatch_Handler,
- },
- {
- MethodName: "GateRecordAdd",
- Handler: _Device_GateRecordAdd_Handler,
- },
- {
- MethodName: "GateCommandUse",
- Handler: _Device_GateCommandUse_Handler,
- },
- {
- MethodName: "GateCommandResult",
- Handler: _Device_GateCommandResult_Handler,
- },
- {
- MethodName: "GateVisitorCheck",
- Handler: _Device_GateVisitorCheck_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "device_service.proto",
- }
|