smart_auth.pb.go 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: smart_auth.proto
  3. // package声明符,用来防止不同的消息类型有命名冲突
  4. package pb
  5. import (
  6. context "context"
  7. v1 "dust-monitor/pb/v1"
  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. // 215 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, 0x2d, 0x65,
  32. 0xe2, 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, 0x41, 0xcc, 0x71, 0xe0, 0xe2, 0x71, 0x4f, 0x2d, 0x71, 0xcc, 0xc9, 0x71, 0x29,
  39. 0x2d, 0x2e, 0x09, 0xce, 0x13, 0x02, 0x2b, 0x45, 0x16, 0x81, 0x99, 0x21, 0x8a, 0x29, 0x01, 0x36,
  40. 0xc1, 0x49, 0x30, 0x8a, 0x3f, 0xa5, 0xb4, 0xb8, 0x44, 0x37, 0x37, 0x3f, 0x2f, 0xb3, 0x24, 0xbf,
  41. 0x48, 0xbf, 0x20, 0x29, 0x89, 0x0d, 0x1c, 0x82, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c,
  42. 0x66, 0xe8, 0x3d, 0x6a, 0x01, 0x00, 0x00,
  43. }
  44. // Reference imports to suppress errors if they are not otherwise used.
  45. var _ context.Context
  46. var _ grpc.ClientConnInterface
  47. // This is a compile-time assertion to ensure that this generated file
  48. // is compatible with the grpc package it is being compiled against.
  49. const _ = grpc.SupportPackageIsVersion6
  50. // SmartAuthClient is the client API for SmartAuth service.
  51. //
  52. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  53. type SmartAuthClient interface {
  54. // 获取设备基本信息
  55. DeviceInfo(ctx context.Context, in *v1.DeviceInfoRequest, opts ...grpc.CallOption) (*v1.DeviceInfoReply, error)
  56. // 设备状态更新
  57. DeviceStatusUpdate(ctx context.Context, in *v1.DeviceStatusUpdateRequest, opts ...grpc.CallOption) (*v1.DeviceStatusUpdateReply, error)
  58. // 设备参数设置
  59. DeviceParamSet(ctx context.Context, in *v1.DeviceParamSetRequest, opts ...grpc.CallOption) (*v1.DeviceParamSetReply, error)
  60. // 获取所有扬尘sn码
  61. GetAllDustSn(ctx context.Context, in *v1.GetAllDustSnRequest, opts ...grpc.CallOption) (*v1.GetAllDustSnReply, error)
  62. }
  63. type smartAuthClient struct {
  64. cc grpc.ClientConnInterface
  65. }
  66. func NewSmartAuthClient(cc grpc.ClientConnInterface) SmartAuthClient {
  67. return &smartAuthClient{cc}
  68. }
  69. func (c *smartAuthClient) DeviceInfo(ctx context.Context, in *v1.DeviceInfoRequest, opts ...grpc.CallOption) (*v1.DeviceInfoReply, error) {
  70. out := new(v1.DeviceInfoReply)
  71. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceInfo", in, out, opts...)
  72. if err != nil {
  73. return nil, err
  74. }
  75. return out, nil
  76. }
  77. func (c *smartAuthClient) DeviceStatusUpdate(ctx context.Context, in *v1.DeviceStatusUpdateRequest, opts ...grpc.CallOption) (*v1.DeviceStatusUpdateReply, error) {
  78. out := new(v1.DeviceStatusUpdateReply)
  79. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceStatusUpdate", in, out, opts...)
  80. if err != nil {
  81. return nil, err
  82. }
  83. return out, nil
  84. }
  85. func (c *smartAuthClient) DeviceParamSet(ctx context.Context, in *v1.DeviceParamSetRequest, opts ...grpc.CallOption) (*v1.DeviceParamSetReply, error) {
  86. out := new(v1.DeviceParamSetReply)
  87. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceParamSet", in, out, opts...)
  88. if err != nil {
  89. return nil, err
  90. }
  91. return out, nil
  92. }
  93. func (c *smartAuthClient) GetAllDustSn(ctx context.Context, in *v1.GetAllDustSnRequest, opts ...grpc.CallOption) (*v1.GetAllDustSnReply, error) {
  94. out := new(v1.GetAllDustSnReply)
  95. err := c.cc.Invoke(ctx, "/pb.SmartAuth/GetAllDustSn", in, out, opts...)
  96. if err != nil {
  97. return nil, err
  98. }
  99. return out, nil
  100. }
  101. // SmartAuthServer is the server API for SmartAuth service.
  102. type SmartAuthServer interface {
  103. // 获取设备基本信息
  104. DeviceInfo(context.Context, *v1.DeviceInfoRequest) (*v1.DeviceInfoReply, error)
  105. // 设备状态更新
  106. DeviceStatusUpdate(context.Context, *v1.DeviceStatusUpdateRequest) (*v1.DeviceStatusUpdateReply, error)
  107. // 设备参数设置
  108. DeviceParamSet(context.Context, *v1.DeviceParamSetRequest) (*v1.DeviceParamSetReply, error)
  109. // 获取所有扬尘sn码
  110. GetAllDustSn(context.Context, *v1.GetAllDustSnRequest) (*v1.GetAllDustSnReply, error)
  111. }
  112. // UnimplementedSmartAuthServer can be embedded to have forward compatible implementations.
  113. type UnimplementedSmartAuthServer struct {
  114. }
  115. func (*UnimplementedSmartAuthServer) DeviceInfo(ctx context.Context, req *v1.DeviceInfoRequest) (*v1.DeviceInfoReply, error) {
  116. return nil, status.Errorf(codes.Unimplemented, "method DeviceInfo not implemented")
  117. }
  118. func (*UnimplementedSmartAuthServer) DeviceStatusUpdate(ctx context.Context, req *v1.DeviceStatusUpdateRequest) (*v1.DeviceStatusUpdateReply, error) {
  119. return nil, status.Errorf(codes.Unimplemented, "method DeviceStatusUpdate not implemented")
  120. }
  121. func (*UnimplementedSmartAuthServer) DeviceParamSet(ctx context.Context, req *v1.DeviceParamSetRequest) (*v1.DeviceParamSetReply, error) {
  122. return nil, status.Errorf(codes.Unimplemented, "method DeviceParamSet not implemented")
  123. }
  124. func (*UnimplementedSmartAuthServer) GetAllDustSn(ctx context.Context, req *v1.GetAllDustSnRequest) (*v1.GetAllDustSnReply, error) {
  125. return nil, status.Errorf(codes.Unimplemented, "method GetAllDustSn not implemented")
  126. }
  127. func RegisterSmartAuthServer(s *grpc.Server, srv SmartAuthServer) {
  128. s.RegisterService(&_SmartAuth_serviceDesc, srv)
  129. }
  130. func _SmartAuth_DeviceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  131. in := new(v1.DeviceInfoRequest)
  132. if err := dec(in); err != nil {
  133. return nil, err
  134. }
  135. if interceptor == nil {
  136. return srv.(SmartAuthServer).DeviceInfo(ctx, in)
  137. }
  138. info := &grpc.UnaryServerInfo{
  139. Server: srv,
  140. FullMethod: "/pb.SmartAuth/DeviceInfo",
  141. }
  142. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  143. return srv.(SmartAuthServer).DeviceInfo(ctx, req.(*v1.DeviceInfoRequest))
  144. }
  145. return interceptor(ctx, in, info, handler)
  146. }
  147. func _SmartAuth_DeviceStatusUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  148. in := new(v1.DeviceStatusUpdateRequest)
  149. if err := dec(in); err != nil {
  150. return nil, err
  151. }
  152. if interceptor == nil {
  153. return srv.(SmartAuthServer).DeviceStatusUpdate(ctx, in)
  154. }
  155. info := &grpc.UnaryServerInfo{
  156. Server: srv,
  157. FullMethod: "/pb.SmartAuth/DeviceStatusUpdate",
  158. }
  159. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  160. return srv.(SmartAuthServer).DeviceStatusUpdate(ctx, req.(*v1.DeviceStatusUpdateRequest))
  161. }
  162. return interceptor(ctx, in, info, handler)
  163. }
  164. func _SmartAuth_DeviceParamSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  165. in := new(v1.DeviceParamSetRequest)
  166. if err := dec(in); err != nil {
  167. return nil, err
  168. }
  169. if interceptor == nil {
  170. return srv.(SmartAuthServer).DeviceParamSet(ctx, in)
  171. }
  172. info := &grpc.UnaryServerInfo{
  173. Server: srv,
  174. FullMethod: "/pb.SmartAuth/DeviceParamSet",
  175. }
  176. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  177. return srv.(SmartAuthServer).DeviceParamSet(ctx, req.(*v1.DeviceParamSetRequest))
  178. }
  179. return interceptor(ctx, in, info, handler)
  180. }
  181. func _SmartAuth_GetAllDustSn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  182. in := new(v1.GetAllDustSnRequest)
  183. if err := dec(in); err != nil {
  184. return nil, err
  185. }
  186. if interceptor == nil {
  187. return srv.(SmartAuthServer).GetAllDustSn(ctx, in)
  188. }
  189. info := &grpc.UnaryServerInfo{
  190. Server: srv,
  191. FullMethod: "/pb.SmartAuth/GetAllDustSn",
  192. }
  193. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  194. return srv.(SmartAuthServer).GetAllDustSn(ctx, req.(*v1.GetAllDustSnRequest))
  195. }
  196. return interceptor(ctx, in, info, handler)
  197. }
  198. var _SmartAuth_serviceDesc = grpc.ServiceDesc{
  199. ServiceName: "pb.SmartAuth",
  200. HandlerType: (*SmartAuthServer)(nil),
  201. Methods: []grpc.MethodDesc{
  202. {
  203. MethodName: "DeviceInfo",
  204. Handler: _SmartAuth_DeviceInfo_Handler,
  205. },
  206. {
  207. MethodName: "DeviceStatusUpdate",
  208. Handler: _SmartAuth_DeviceStatusUpdate_Handler,
  209. },
  210. {
  211. MethodName: "DeviceParamSet",
  212. Handler: _SmartAuth_DeviceParamSet_Handler,
  213. },
  214. {
  215. MethodName: "GetAllDustSn",
  216. Handler: _SmartAuth_GetAllDustSn_Handler,
  217. },
  218. },
  219. Streams: []grpc.StreamDesc{},
  220. Metadata: "smart_auth.proto",
  221. }