smart_auth.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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. 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 "tower-monitor/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("smart_auth.proto", fileDescriptor_aaaceba66a98f379)
  26. }
  27. var fileDescriptor_aaaceba66a98f379 = []byte{
  28. // 231 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, 0xbd, 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, 0x6e, 0x5c, 0x7c,
  35. 0x08, 0x41, 0xa7, 0x4a, 0xcf, 0x14, 0x21, 0x49, 0x54, 0x85, 0x20, 0x31, 0x98, 0x19, 0xe2, 0xd8,
  36. 0xa4, 0x20, 0xe6, 0x04, 0x71, 0x09, 0x41, 0x24, 0x82, 0x4b, 0x12, 0x4b, 0x4a, 0x8b, 0x43, 0x0b,
  37. 0x52, 0x12, 0x4b, 0x52, 0x85, 0x64, 0x11, 0x1a, 0x90, 0xc5, 0x61, 0xe6, 0x49, 0xe3, 0x92, 0x46,
  38. 0x73, 0x5b, 0x40, 0x62, 0x51, 0x62, 0x6e, 0x70, 0x6a, 0x09, 0xb2, 0xdb, 0x60, 0x62, 0x58, 0xdc,
  39. 0x86, 0x90, 0x82, 0x98, 0xe3, 0xc0, 0xc5, 0xe3, 0x9e, 0x5a, 0xe2, 0x98, 0x93, 0xe3, 0x52, 0x5a,
  40. 0x5c, 0x12, 0x9c, 0x27, 0x04, 0x56, 0x8a, 0x2c, 0x02, 0x33, 0x43, 0x14, 0x53, 0x02, 0x6c, 0x82,
  41. 0x93, 0x50, 0x94, 0x40, 0x49, 0x7e, 0x79, 0x6a, 0x91, 0x6e, 0x6e, 0x7e, 0x5e, 0x66, 0x49, 0x7e,
  42. 0x91, 0x7e, 0x41, 0x52, 0x12, 0x1b, 0x38, 0x2a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xce,
  43. 0x3e, 0x8b, 0xa1, 0xb3, 0x01, 0x00, 0x00,
  44. }
  45. // Reference imports to suppress errors if they are not otherwise used.
  46. var _ context.Context
  47. var _ grpc.ClientConnInterface
  48. // This is a compile-time assertion to ensure that this generated file
  49. // is compatible with the grpc package it is being compiled against.
  50. const _ = grpc.SupportPackageIsVersion6
  51. // SmartAuthClient is the client API for SmartAuth service.
  52. //
  53. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  54. type SmartAuthClient interface {
  55. // 获取设备基本信息
  56. DeviceInfo(ctx context.Context, in *v1.DeviceInfoRequest, opts ...grpc.CallOption) (*v1.DeviceInfoReply, error)
  57. DeviceInfoById(ctx context.Context, in *v1.DeviceInfoByIdRequest, opts ...grpc.CallOption) (*v1.DeviceInfoByIdReply, error)
  58. // 设备状态更新
  59. DeviceStatusUpdate(ctx context.Context, in *v1.DeviceStatusUpdateRequest, opts ...grpc.CallOption) (*v1.DeviceStatusUpdateReply, error)
  60. // 设备参数设置
  61. DeviceParamSet(ctx context.Context, in *v1.DeviceParamSetRequest, opts ...grpc.CallOption) (*v1.DeviceParamSetReply, error)
  62. // 获取所有扬尘sn码
  63. GetAllDustSn(ctx context.Context, in *v1.GetAllDustSnRequest, opts ...grpc.CallOption) (*v1.GetAllDustSnReply, error)
  64. }
  65. type smartAuthClient struct {
  66. cc grpc.ClientConnInterface
  67. }
  68. func NewSmartAuthClient(cc grpc.ClientConnInterface) SmartAuthClient {
  69. return &smartAuthClient{cc}
  70. }
  71. func (c *smartAuthClient) DeviceInfo(ctx context.Context, in *v1.DeviceInfoRequest, opts ...grpc.CallOption) (*v1.DeviceInfoReply, error) {
  72. out := new(v1.DeviceInfoReply)
  73. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceInfo", in, out, opts...)
  74. if err != nil {
  75. return nil, err
  76. }
  77. return out, nil
  78. }
  79. func (c *smartAuthClient) DeviceInfoById(ctx context.Context, in *v1.DeviceInfoByIdRequest, opts ...grpc.CallOption) (*v1.DeviceInfoByIdReply, error) {
  80. out := new(v1.DeviceInfoByIdReply)
  81. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceInfoById", in, out, opts...)
  82. if err != nil {
  83. return nil, err
  84. }
  85. return out, nil
  86. }
  87. func (c *smartAuthClient) DeviceStatusUpdate(ctx context.Context, in *v1.DeviceStatusUpdateRequest, opts ...grpc.CallOption) (*v1.DeviceStatusUpdateReply, error) {
  88. out := new(v1.DeviceStatusUpdateReply)
  89. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceStatusUpdate", in, out, opts...)
  90. if err != nil {
  91. return nil, err
  92. }
  93. return out, nil
  94. }
  95. func (c *smartAuthClient) DeviceParamSet(ctx context.Context, in *v1.DeviceParamSetRequest, opts ...grpc.CallOption) (*v1.DeviceParamSetReply, error) {
  96. out := new(v1.DeviceParamSetReply)
  97. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceParamSet", in, out, opts...)
  98. if err != nil {
  99. return nil, err
  100. }
  101. return out, nil
  102. }
  103. func (c *smartAuthClient) GetAllDustSn(ctx context.Context, in *v1.GetAllDustSnRequest, opts ...grpc.CallOption) (*v1.GetAllDustSnReply, error) {
  104. out := new(v1.GetAllDustSnReply)
  105. err := c.cc.Invoke(ctx, "/pb.SmartAuth/GetAllDustSn", in, out, opts...)
  106. if err != nil {
  107. return nil, err
  108. }
  109. return out, nil
  110. }
  111. // SmartAuthServer is the server API for SmartAuth service.
  112. type SmartAuthServer interface {
  113. // 获取设备基本信息
  114. DeviceInfo(context.Context, *v1.DeviceInfoRequest) (*v1.DeviceInfoReply, error)
  115. DeviceInfoById(context.Context, *v1.DeviceInfoByIdRequest) (*v1.DeviceInfoByIdReply, error)
  116. // 设备状态更新
  117. DeviceStatusUpdate(context.Context, *v1.DeviceStatusUpdateRequest) (*v1.DeviceStatusUpdateReply, error)
  118. // 设备参数设置
  119. DeviceParamSet(context.Context, *v1.DeviceParamSetRequest) (*v1.DeviceParamSetReply, error)
  120. // 获取所有扬尘sn码
  121. GetAllDustSn(context.Context, *v1.GetAllDustSnRequest) (*v1.GetAllDustSnReply, error)
  122. }
  123. // UnimplementedSmartAuthServer can be embedded to have forward compatible implementations.
  124. type UnimplementedSmartAuthServer struct {
  125. }
  126. func (*UnimplementedSmartAuthServer) DeviceInfo(ctx context.Context, req *v1.DeviceInfoRequest) (*v1.DeviceInfoReply, error) {
  127. return nil, status.Errorf(codes.Unimplemented, "method DeviceInfo not implemented")
  128. }
  129. func (*UnimplementedSmartAuthServer) DeviceInfoById(ctx context.Context, req *v1.DeviceInfoByIdRequest) (*v1.DeviceInfoByIdReply, error) {
  130. return nil, status.Errorf(codes.Unimplemented, "method DeviceInfoById not implemented")
  131. }
  132. func (*UnimplementedSmartAuthServer) DeviceStatusUpdate(ctx context.Context, req *v1.DeviceStatusUpdateRequest) (*v1.DeviceStatusUpdateReply, error) {
  133. return nil, status.Errorf(codes.Unimplemented, "method DeviceStatusUpdate not implemented")
  134. }
  135. func (*UnimplementedSmartAuthServer) DeviceParamSet(ctx context.Context, req *v1.DeviceParamSetRequest) (*v1.DeviceParamSetReply, error) {
  136. return nil, status.Errorf(codes.Unimplemented, "method DeviceParamSet not implemented")
  137. }
  138. func (*UnimplementedSmartAuthServer) GetAllDustSn(ctx context.Context, req *v1.GetAllDustSnRequest) (*v1.GetAllDustSnReply, error) {
  139. return nil, status.Errorf(codes.Unimplemented, "method GetAllDustSn not implemented")
  140. }
  141. func RegisterSmartAuthServer(s *grpc.Server, srv SmartAuthServer) {
  142. s.RegisterService(&_SmartAuth_serviceDesc, srv)
  143. }
  144. func _SmartAuth_DeviceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  145. in := new(v1.DeviceInfoRequest)
  146. if err := dec(in); err != nil {
  147. return nil, err
  148. }
  149. if interceptor == nil {
  150. return srv.(SmartAuthServer).DeviceInfo(ctx, in)
  151. }
  152. info := &grpc.UnaryServerInfo{
  153. Server: srv,
  154. FullMethod: "/pb.SmartAuth/DeviceInfo",
  155. }
  156. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  157. return srv.(SmartAuthServer).DeviceInfo(ctx, req.(*v1.DeviceInfoRequest))
  158. }
  159. return interceptor(ctx, in, info, handler)
  160. }
  161. func _SmartAuth_DeviceInfoById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  162. in := new(v1.DeviceInfoByIdRequest)
  163. if err := dec(in); err != nil {
  164. return nil, err
  165. }
  166. if interceptor == nil {
  167. return srv.(SmartAuthServer).DeviceInfoById(ctx, in)
  168. }
  169. info := &grpc.UnaryServerInfo{
  170. Server: srv,
  171. FullMethod: "/pb.SmartAuth/DeviceInfoById",
  172. }
  173. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  174. return srv.(SmartAuthServer).DeviceInfoById(ctx, req.(*v1.DeviceInfoByIdRequest))
  175. }
  176. return interceptor(ctx, in, info, handler)
  177. }
  178. func _SmartAuth_DeviceStatusUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  179. in := new(v1.DeviceStatusUpdateRequest)
  180. if err := dec(in); err != nil {
  181. return nil, err
  182. }
  183. if interceptor == nil {
  184. return srv.(SmartAuthServer).DeviceStatusUpdate(ctx, in)
  185. }
  186. info := &grpc.UnaryServerInfo{
  187. Server: srv,
  188. FullMethod: "/pb.SmartAuth/DeviceStatusUpdate",
  189. }
  190. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  191. return srv.(SmartAuthServer).DeviceStatusUpdate(ctx, req.(*v1.DeviceStatusUpdateRequest))
  192. }
  193. return interceptor(ctx, in, info, handler)
  194. }
  195. func _SmartAuth_DeviceParamSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  196. in := new(v1.DeviceParamSetRequest)
  197. if err := dec(in); err != nil {
  198. return nil, err
  199. }
  200. if interceptor == nil {
  201. return srv.(SmartAuthServer).DeviceParamSet(ctx, in)
  202. }
  203. info := &grpc.UnaryServerInfo{
  204. Server: srv,
  205. FullMethod: "/pb.SmartAuth/DeviceParamSet",
  206. }
  207. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  208. return srv.(SmartAuthServer).DeviceParamSet(ctx, req.(*v1.DeviceParamSetRequest))
  209. }
  210. return interceptor(ctx, in, info, handler)
  211. }
  212. func _SmartAuth_GetAllDustSn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  213. in := new(v1.GetAllDustSnRequest)
  214. if err := dec(in); err != nil {
  215. return nil, err
  216. }
  217. if interceptor == nil {
  218. return srv.(SmartAuthServer).GetAllDustSn(ctx, in)
  219. }
  220. info := &grpc.UnaryServerInfo{
  221. Server: srv,
  222. FullMethod: "/pb.SmartAuth/GetAllDustSn",
  223. }
  224. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  225. return srv.(SmartAuthServer).GetAllDustSn(ctx, req.(*v1.GetAllDustSnRequest))
  226. }
  227. return interceptor(ctx, in, info, handler)
  228. }
  229. var _SmartAuth_serviceDesc = grpc.ServiceDesc{
  230. ServiceName: "pb.SmartAuth",
  231. HandlerType: (*SmartAuthServer)(nil),
  232. Methods: []grpc.MethodDesc{
  233. {
  234. MethodName: "DeviceInfo",
  235. Handler: _SmartAuth_DeviceInfo_Handler,
  236. },
  237. {
  238. MethodName: "DeviceInfoById",
  239. Handler: _SmartAuth_DeviceInfoById_Handler,
  240. },
  241. {
  242. MethodName: "DeviceStatusUpdate",
  243. Handler: _SmartAuth_DeviceStatusUpdate_Handler,
  244. },
  245. {
  246. MethodName: "DeviceParamSet",
  247. Handler: _SmartAuth_DeviceParamSet_Handler,
  248. },
  249. {
  250. MethodName: "GetAllDustSn",
  251. Handler: _SmartAuth_GetAllDustSn_Handler,
  252. },
  253. },
  254. Streams: []grpc.StreamDesc{},
  255. Metadata: "smart_auth.proto",
  256. }