smart_auth.pb.go 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: smart_auth.proto
  3. // package声明符,用来防止不同的消息类型有命名冲突
  4. package pb
  5. import (
  6. v1 "access-control-monitor/pb/v1"
  7. context "context"
  8. fmt "fmt"
  9. proto "github.com/golang/protobuf/proto"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. math "math"
  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("smart_auth.proto", fileDescriptor_aaaceba66a98f379)
  26. }
  27. var fileDescriptor_aaaceba66a98f379 = []byte{
  28. // 197 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x28, 0xce, 0x4d, 0x2c,
  30. 0x2a, 0x89, 0x4f, 0x2c, 0x2d, 0xc9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48,
  31. 0x92, 0xe2, 0x2f, 0x33, 0xd4, 0x4f, 0x49, 0x2d, 0xcb, 0x4c, 0x4e, 0x85, 0x08, 0x1a, 0x3d, 0x66,
  32. 0xe4, 0xe2, 0x0c, 0x06, 0xa9, 0x74, 0x2c, 0x2d, 0xc9, 0x10, 0xb2, 0xe2, 0xe2, 0x72, 0x01, 0xcb,
  33. 0x7a, 0xe6, 0xa5, 0xe5, 0x0b, 0x89, 0xea, 0x95, 0x19, 0xea, 0x21, 0xf8, 0x41, 0xa9, 0x85, 0xa5,
  34. 0xa9, 0xc5, 0x25, 0x52, 0xc2, 0xe8, 0xc2, 0x05, 0x39, 0x95, 0x4a, 0x0c, 0x42, 0x41, 0x5c, 0x42,
  35. 0x10, 0xc1, 0xe0, 0x92, 0xc4, 0x92, 0xd2, 0xe2, 0xd0, 0x82, 0x94, 0xc4, 0x92, 0x54, 0x21, 0x59,
  36. 0x84, 0x62, 0x64, 0x71, 0x98, 0x59, 0xd2, 0xb8, 0xa4, 0x21, 0x66, 0xba, 0x71, 0xf1, 0x41, 0x24,
  37. 0x03, 0x12, 0x8b, 0x12, 0x73, 0x83, 0x53, 0x4b, 0x84, 0x24, 0x11, 0x1a, 0x60, 0x62, 0x30, 0xb3,
  38. 0xc4, 0xb1, 0x49, 0x81, 0xcd, 0x71, 0x92, 0x8e, 0x92, 0x4c, 0x4c, 0x4e, 0x4e, 0x2d, 0x2e, 0xd6,
  39. 0x4d, 0xce, 0xcf, 0x2b, 0x29, 0xca, 0xcf, 0xd1, 0xcd, 0xcd, 0xcf, 0xcb, 0x2c, 0xc9, 0x2f, 0xd2,
  40. 0x2f, 0x48, 0x4a, 0x62, 0x03, 0x87, 0x84, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xe5, 0xef, 0xef,
  41. 0x50, 0x32, 0x01, 0x00, 0x00,
  42. }
  43. // Reference imports to suppress errors if they are not otherwise used.
  44. var _ context.Context
  45. var _ grpc.ClientConnInterface
  46. // This is a compile-time assertion to ensure that this generated file
  47. // is compatible with the grpc package it is being compiled against.
  48. const _ = grpc.SupportPackageIsVersion6
  49. // SmartAuthClient is the client API for SmartAuth service.
  50. //
  51. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  52. type SmartAuthClient interface {
  53. // 获取设备基本信息
  54. DeviceInfo(ctx context.Context, in *v1.DeviceInfoRequest, opts ...grpc.CallOption) (*v1.DeviceInfoReply, error)
  55. // 设备状态更新
  56. DeviceStatusUpdate(ctx context.Context, in *v1.DeviceStatusUpdateRequest, opts ...grpc.CallOption) (*v1.DeviceStatusUpdateReply, error)
  57. // 设备参数设置
  58. DeviceParamSet(ctx context.Context, in *v1.DeviceParamSetRequest, opts ...grpc.CallOption) (*v1.DeviceParamSetReply, error)
  59. }
  60. type smartAuthClient struct {
  61. cc grpc.ClientConnInterface
  62. }
  63. func NewSmartAuthClient(cc grpc.ClientConnInterface) SmartAuthClient {
  64. return &smartAuthClient{cc}
  65. }
  66. func (c *smartAuthClient) DeviceInfo(ctx context.Context, in *v1.DeviceInfoRequest, opts ...grpc.CallOption) (*v1.DeviceInfoReply, error) {
  67. out := new(v1.DeviceInfoReply)
  68. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceInfo", in, out, opts...)
  69. if err != nil {
  70. return nil, err
  71. }
  72. return out, nil
  73. }
  74. func (c *smartAuthClient) DeviceStatusUpdate(ctx context.Context, in *v1.DeviceStatusUpdateRequest, opts ...grpc.CallOption) (*v1.DeviceStatusUpdateReply, error) {
  75. out := new(v1.DeviceStatusUpdateReply)
  76. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceStatusUpdate", in, out, opts...)
  77. if err != nil {
  78. return nil, err
  79. }
  80. return out, nil
  81. }
  82. func (c *smartAuthClient) DeviceParamSet(ctx context.Context, in *v1.DeviceParamSetRequest, opts ...grpc.CallOption) (*v1.DeviceParamSetReply, error) {
  83. out := new(v1.DeviceParamSetReply)
  84. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceParamSet", in, out, opts...)
  85. if err != nil {
  86. return nil, err
  87. }
  88. return out, nil
  89. }
  90. // SmartAuthServer is the server API for SmartAuth service.
  91. type SmartAuthServer interface {
  92. // 获取设备基本信息
  93. DeviceInfo(context.Context, *v1.DeviceInfoRequest) (*v1.DeviceInfoReply, error)
  94. // 设备状态更新
  95. DeviceStatusUpdate(context.Context, *v1.DeviceStatusUpdateRequest) (*v1.DeviceStatusUpdateReply, error)
  96. // 设备参数设置
  97. DeviceParamSet(context.Context, *v1.DeviceParamSetRequest) (*v1.DeviceParamSetReply, error)
  98. }
  99. // UnimplementedSmartAuthServer can be embedded to have forward compatible implementations.
  100. type UnimplementedSmartAuthServer struct {
  101. }
  102. func (*UnimplementedSmartAuthServer) DeviceInfo(ctx context.Context, req *v1.DeviceInfoRequest) (*v1.DeviceInfoReply, error) {
  103. return nil, status.Errorf(codes.Unimplemented, "method DeviceInfo not implemented")
  104. }
  105. func (*UnimplementedSmartAuthServer) DeviceStatusUpdate(ctx context.Context, req *v1.DeviceStatusUpdateRequest) (*v1.DeviceStatusUpdateReply, error) {
  106. return nil, status.Errorf(codes.Unimplemented, "method DeviceStatusUpdate not implemented")
  107. }
  108. func (*UnimplementedSmartAuthServer) DeviceParamSet(ctx context.Context, req *v1.DeviceParamSetRequest) (*v1.DeviceParamSetReply, error) {
  109. return nil, status.Errorf(codes.Unimplemented, "method DeviceParamSet not implemented")
  110. }
  111. func RegisterSmartAuthServer(s *grpc.Server, srv SmartAuthServer) {
  112. s.RegisterService(&_SmartAuth_serviceDesc, srv)
  113. }
  114. func _SmartAuth_DeviceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  115. in := new(v1.DeviceInfoRequest)
  116. if err := dec(in); err != nil {
  117. return nil, err
  118. }
  119. if interceptor == nil {
  120. return srv.(SmartAuthServer).DeviceInfo(ctx, in)
  121. }
  122. info := &grpc.UnaryServerInfo{
  123. Server: srv,
  124. FullMethod: "/pb.SmartAuth/DeviceInfo",
  125. }
  126. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  127. return srv.(SmartAuthServer).DeviceInfo(ctx, req.(*v1.DeviceInfoRequest))
  128. }
  129. return interceptor(ctx, in, info, handler)
  130. }
  131. func _SmartAuth_DeviceStatusUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  132. in := new(v1.DeviceStatusUpdateRequest)
  133. if err := dec(in); err != nil {
  134. return nil, err
  135. }
  136. if interceptor == nil {
  137. return srv.(SmartAuthServer).DeviceStatusUpdate(ctx, in)
  138. }
  139. info := &grpc.UnaryServerInfo{
  140. Server: srv,
  141. FullMethod: "/pb.SmartAuth/DeviceStatusUpdate",
  142. }
  143. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  144. return srv.(SmartAuthServer).DeviceStatusUpdate(ctx, req.(*v1.DeviceStatusUpdateRequest))
  145. }
  146. return interceptor(ctx, in, info, handler)
  147. }
  148. func _SmartAuth_DeviceParamSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  149. in := new(v1.DeviceParamSetRequest)
  150. if err := dec(in); err != nil {
  151. return nil, err
  152. }
  153. if interceptor == nil {
  154. return srv.(SmartAuthServer).DeviceParamSet(ctx, in)
  155. }
  156. info := &grpc.UnaryServerInfo{
  157. Server: srv,
  158. FullMethod: "/pb.SmartAuth/DeviceParamSet",
  159. }
  160. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  161. return srv.(SmartAuthServer).DeviceParamSet(ctx, req.(*v1.DeviceParamSetRequest))
  162. }
  163. return interceptor(ctx, in, info, handler)
  164. }
  165. var _SmartAuth_serviceDesc = grpc.ServiceDesc{
  166. ServiceName: "pb.SmartAuth",
  167. HandlerType: (*SmartAuthServer)(nil),
  168. Methods: []grpc.MethodDesc{
  169. {
  170. MethodName: "DeviceInfo",
  171. Handler: _SmartAuth_DeviceInfo_Handler,
  172. },
  173. {
  174. MethodName: "DeviceStatusUpdate",
  175. Handler: _SmartAuth_DeviceStatusUpdate_Handler,
  176. },
  177. {
  178. MethodName: "DeviceParamSet",
  179. Handler: _SmartAuth_DeviceParamSet_Handler,
  180. },
  181. },
  182. Streams: []grpc.StreamDesc{},
  183. Metadata: "smart_auth.proto",
  184. }