smart_auth.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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 "smart-auth/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. // 267 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x4b, 0xc3, 0x40,
  30. 0x10, 0x85, 0x45, 0x41, 0xe8, 0xa0, 0x56, 0x46, 0x8b, 0x58, 0xf1, 0xe2, 0xdd, 0x94, 0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, 0xbe,
  42. 0x2a, 0x38, 0x48, 0x51, 0xaf, 0x77, 0x89, 0xcd, 0x19, 0xfd, 0x17, 0x26, 0xe1, 0x0e, 0x06, 0x3e,
  43. 0x25, 0x66, 0x03, 0x9e, 0x9a, 0x6d, 0x7f, 0x4f, 0x3b, 0x8b, 0x1d, 0xaa, 0x07, 0xe7, 0xc3, 0xf7,
  44. 0x43, 0x7d, 0x25, 0xd7, 0xf5, 0x95, 0x4c, 0x64, 0x18, 0xee, 0xeb, 0xa3, 0xb8, 0xfd, 0x0d, 0x00,
  45. 0x00, 0xff, 0xff, 0xa7, 0x85, 0x64, 0xf0, 0x3d, 0x02, 0x00, 0x00,
  46. }
  47. // Reference imports to suppress errors if they are not otherwise used.
  48. var _ context.Context
  49. var _ grpc.ClientConnInterface
  50. // This is a compile-time assertion to ensure that this generated file
  51. // is compatible with the grpc package it is being compiled against.
  52. const _ = grpc.SupportPackageIsVersion6
  53. // SmartAuthClient is the client API for SmartAuth service.
  54. //
  55. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  56. type SmartAuthClient interface {
  57. // 获取设备基本信息
  58. DeviceInfo(ctx context.Context, in *v1.DeviceInfoRequest, opts ...grpc.CallOption) (*v1.DeviceInfoReply, error)
  59. DeviceInfoById(ctx context.Context, in *v1.DeviceInfoByIdRequest, opts ...grpc.CallOption) (*v1.DeviceInfoByIdReply, error)
  60. // 设备状态更新
  61. DeviceStatusUpdate(ctx context.Context, in *v1.DeviceStatusUpdateRequest, opts ...grpc.CallOption) (*v1.DeviceStatusUpdateReply, error)
  62. // 设备参数设置
  63. DeviceParamSet(ctx context.Context, in *v1.DeviceParamSetRequest, opts ...grpc.CallOption) (*v1.DeviceParamSetReply, error)
  64. // 设备信息变动通知
  65. DeviceChangeNotify(ctx context.Context, in *v1.DeviceChangeNotifyRequest, opts ...grpc.CallOption) (*v1.DeviceChangeNotifyReply, error)
  66. // 获取所有扬尘sn码
  67. GetAllDustSn(ctx context.Context, in *v1.GetAllDustSnRequest, opts ...grpc.CallOption) (*v1.GetAllDustSnReply, error)
  68. DelDevice(ctx context.Context, in *v1.DelDeviceRequest, opts ...grpc.CallOption) (*v1.DelDeviceReply, error)
  69. }
  70. type smartAuthClient struct {
  71. cc grpc.ClientConnInterface
  72. }
  73. func NewSmartAuthClient(cc grpc.ClientConnInterface) SmartAuthClient {
  74. return &smartAuthClient{cc}
  75. }
  76. func (c *smartAuthClient) DeviceInfo(ctx context.Context, in *v1.DeviceInfoRequest, opts ...grpc.CallOption) (*v1.DeviceInfoReply, error) {
  77. out := new(v1.DeviceInfoReply)
  78. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceInfo", in, out, opts...)
  79. if err != nil {
  80. return nil, err
  81. }
  82. return out, nil
  83. }
  84. func (c *smartAuthClient) DeviceInfoById(ctx context.Context, in *v1.DeviceInfoByIdRequest, opts ...grpc.CallOption) (*v1.DeviceInfoByIdReply, error) {
  85. out := new(v1.DeviceInfoByIdReply)
  86. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceInfoById", in, out, opts...)
  87. if err != nil {
  88. return nil, err
  89. }
  90. return out, nil
  91. }
  92. func (c *smartAuthClient) DeviceStatusUpdate(ctx context.Context, in *v1.DeviceStatusUpdateRequest, opts ...grpc.CallOption) (*v1.DeviceStatusUpdateReply, error) {
  93. out := new(v1.DeviceStatusUpdateReply)
  94. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceStatusUpdate", in, out, opts...)
  95. if err != nil {
  96. return nil, err
  97. }
  98. return out, nil
  99. }
  100. func (c *smartAuthClient) DeviceParamSet(ctx context.Context, in *v1.DeviceParamSetRequest, opts ...grpc.CallOption) (*v1.DeviceParamSetReply, error) {
  101. out := new(v1.DeviceParamSetReply)
  102. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceParamSet", in, out, opts...)
  103. if err != nil {
  104. return nil, err
  105. }
  106. return out, nil
  107. }
  108. func (c *smartAuthClient) DeviceChangeNotify(ctx context.Context, in *v1.DeviceChangeNotifyRequest, opts ...grpc.CallOption) (*v1.DeviceChangeNotifyReply, error) {
  109. out := new(v1.DeviceChangeNotifyReply)
  110. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DeviceChangeNotify", in, out, opts...)
  111. if err != nil {
  112. return nil, err
  113. }
  114. return out, nil
  115. }
  116. func (c *smartAuthClient) GetAllDustSn(ctx context.Context, in *v1.GetAllDustSnRequest, opts ...grpc.CallOption) (*v1.GetAllDustSnReply, error) {
  117. out := new(v1.GetAllDustSnReply)
  118. err := c.cc.Invoke(ctx, "/pb.SmartAuth/GetAllDustSn", in, out, opts...)
  119. if err != nil {
  120. return nil, err
  121. }
  122. return out, nil
  123. }
  124. func (c *smartAuthClient) DelDevice(ctx context.Context, in *v1.DelDeviceRequest, opts ...grpc.CallOption) (*v1.DelDeviceReply, error) {
  125. out := new(v1.DelDeviceReply)
  126. err := c.cc.Invoke(ctx, "/pb.SmartAuth/DelDevice", in, out, opts...)
  127. if err != nil {
  128. return nil, err
  129. }
  130. return out, nil
  131. }
  132. // SmartAuthServer is the server API for SmartAuth service.
  133. type SmartAuthServer interface {
  134. // 获取设备基本信息
  135. DeviceInfo(context.Context, *v1.DeviceInfoRequest) (*v1.DeviceInfoReply, error)
  136. DeviceInfoById(context.Context, *v1.DeviceInfoByIdRequest) (*v1.DeviceInfoByIdReply, error)
  137. // 设备状态更新
  138. DeviceStatusUpdate(context.Context, *v1.DeviceStatusUpdateRequest) (*v1.DeviceStatusUpdateReply, error)
  139. // 设备参数设置
  140. DeviceParamSet(context.Context, *v1.DeviceParamSetRequest) (*v1.DeviceParamSetReply, error)
  141. // 设备信息变动通知
  142. DeviceChangeNotify(context.Context, *v1.DeviceChangeNotifyRequest) (*v1.DeviceChangeNotifyReply, error)
  143. // 获取所有扬尘sn码
  144. GetAllDustSn(context.Context, *v1.GetAllDustSnRequest) (*v1.GetAllDustSnReply, error)
  145. DelDevice(context.Context, *v1.DelDeviceRequest) (*v1.DelDeviceReply, error)
  146. }
  147. // UnimplementedSmartAuthServer can be embedded to have forward compatible implementations.
  148. type UnimplementedSmartAuthServer struct {
  149. }
  150. func (*UnimplementedSmartAuthServer) DeviceInfo(ctx context.Context, req *v1.DeviceInfoRequest) (*v1.DeviceInfoReply, error) {
  151. return nil, status.Errorf(codes.Unimplemented, "method DeviceInfo not implemented")
  152. }
  153. func (*UnimplementedSmartAuthServer) DeviceInfoById(ctx context.Context, req *v1.DeviceInfoByIdRequest) (*v1.DeviceInfoByIdReply, error) {
  154. return nil, status.Errorf(codes.Unimplemented, "method DeviceInfoById not implemented")
  155. }
  156. func (*UnimplementedSmartAuthServer) DeviceStatusUpdate(ctx context.Context, req *v1.DeviceStatusUpdateRequest) (*v1.DeviceStatusUpdateReply, error) {
  157. return nil, status.Errorf(codes.Unimplemented, "method DeviceStatusUpdate not implemented")
  158. }
  159. func (*UnimplementedSmartAuthServer) DeviceParamSet(ctx context.Context, req *v1.DeviceParamSetRequest) (*v1.DeviceParamSetReply, error) {
  160. return nil, status.Errorf(codes.Unimplemented, "method DeviceParamSet not implemented")
  161. }
  162. func (*UnimplementedSmartAuthServer) DeviceChangeNotify(ctx context.Context, req *v1.DeviceChangeNotifyRequest) (*v1.DeviceChangeNotifyReply, error) {
  163. return nil, status.Errorf(codes.Unimplemented, "method DeviceChangeNotify not implemented")
  164. }
  165. func (*UnimplementedSmartAuthServer) GetAllDustSn(ctx context.Context, req *v1.GetAllDustSnRequest) (*v1.GetAllDustSnReply, error) {
  166. return nil, status.Errorf(codes.Unimplemented, "method GetAllDustSn not implemented")
  167. }
  168. func (*UnimplementedSmartAuthServer) DelDevice(ctx context.Context, req *v1.DelDeviceRequest) (*v1.DelDeviceReply, error) {
  169. return nil, status.Errorf(codes.Unimplemented, "method DelDevice not implemented")
  170. }
  171. func RegisterSmartAuthServer(s *grpc.Server, srv SmartAuthServer) {
  172. s.RegisterService(&_SmartAuth_serviceDesc, srv)
  173. }
  174. func _SmartAuth_DeviceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  175. in := new(v1.DeviceInfoRequest)
  176. if err := dec(in); err != nil {
  177. return nil, err
  178. }
  179. if interceptor == nil {
  180. return srv.(SmartAuthServer).DeviceInfo(ctx, in)
  181. }
  182. info := &grpc.UnaryServerInfo{
  183. Server: srv,
  184. FullMethod: "/pb.SmartAuth/DeviceInfo",
  185. }
  186. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  187. return srv.(SmartAuthServer).DeviceInfo(ctx, req.(*v1.DeviceInfoRequest))
  188. }
  189. return interceptor(ctx, in, info, handler)
  190. }
  191. func _SmartAuth_DeviceInfoById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  192. in := new(v1.DeviceInfoByIdRequest)
  193. if err := dec(in); err != nil {
  194. return nil, err
  195. }
  196. if interceptor == nil {
  197. return srv.(SmartAuthServer).DeviceInfoById(ctx, in)
  198. }
  199. info := &grpc.UnaryServerInfo{
  200. Server: srv,
  201. FullMethod: "/pb.SmartAuth/DeviceInfoById",
  202. }
  203. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  204. return srv.(SmartAuthServer).DeviceInfoById(ctx, req.(*v1.DeviceInfoByIdRequest))
  205. }
  206. return interceptor(ctx, in, info, handler)
  207. }
  208. func _SmartAuth_DeviceStatusUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  209. in := new(v1.DeviceStatusUpdateRequest)
  210. if err := dec(in); err != nil {
  211. return nil, err
  212. }
  213. if interceptor == nil {
  214. return srv.(SmartAuthServer).DeviceStatusUpdate(ctx, in)
  215. }
  216. info := &grpc.UnaryServerInfo{
  217. Server: srv,
  218. FullMethod: "/pb.SmartAuth/DeviceStatusUpdate",
  219. }
  220. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  221. return srv.(SmartAuthServer).DeviceStatusUpdate(ctx, req.(*v1.DeviceStatusUpdateRequest))
  222. }
  223. return interceptor(ctx, in, info, handler)
  224. }
  225. func _SmartAuth_DeviceParamSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  226. in := new(v1.DeviceParamSetRequest)
  227. if err := dec(in); err != nil {
  228. return nil, err
  229. }
  230. if interceptor == nil {
  231. return srv.(SmartAuthServer).DeviceParamSet(ctx, in)
  232. }
  233. info := &grpc.UnaryServerInfo{
  234. Server: srv,
  235. FullMethod: "/pb.SmartAuth/DeviceParamSet",
  236. }
  237. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  238. return srv.(SmartAuthServer).DeviceParamSet(ctx, req.(*v1.DeviceParamSetRequest))
  239. }
  240. return interceptor(ctx, in, info, handler)
  241. }
  242. func _SmartAuth_DeviceChangeNotify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  243. in := new(v1.DeviceChangeNotifyRequest)
  244. if err := dec(in); err != nil {
  245. return nil, err
  246. }
  247. if interceptor == nil {
  248. return srv.(SmartAuthServer).DeviceChangeNotify(ctx, in)
  249. }
  250. info := &grpc.UnaryServerInfo{
  251. Server: srv,
  252. FullMethod: "/pb.SmartAuth/DeviceChangeNotify",
  253. }
  254. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  255. return srv.(SmartAuthServer).DeviceChangeNotify(ctx, req.(*v1.DeviceChangeNotifyRequest))
  256. }
  257. return interceptor(ctx, in, info, handler)
  258. }
  259. func _SmartAuth_GetAllDustSn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  260. in := new(v1.GetAllDustSnRequest)
  261. if err := dec(in); err != nil {
  262. return nil, err
  263. }
  264. if interceptor == nil {
  265. return srv.(SmartAuthServer).GetAllDustSn(ctx, in)
  266. }
  267. info := &grpc.UnaryServerInfo{
  268. Server: srv,
  269. FullMethod: "/pb.SmartAuth/GetAllDustSn",
  270. }
  271. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  272. return srv.(SmartAuthServer).GetAllDustSn(ctx, req.(*v1.GetAllDustSnRequest))
  273. }
  274. return interceptor(ctx, in, info, handler)
  275. }
  276. func _SmartAuth_DelDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  277. in := new(v1.DelDeviceRequest)
  278. if err := dec(in); err != nil {
  279. return nil, err
  280. }
  281. if interceptor == nil {
  282. return srv.(SmartAuthServer).DelDevice(ctx, in)
  283. }
  284. info := &grpc.UnaryServerInfo{
  285. Server: srv,
  286. FullMethod: "/pb.SmartAuth/DelDevice",
  287. }
  288. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  289. return srv.(SmartAuthServer).DelDevice(ctx, req.(*v1.DelDeviceRequest))
  290. }
  291. return interceptor(ctx, in, info, handler)
  292. }
  293. var _SmartAuth_serviceDesc = grpc.ServiceDesc{
  294. ServiceName: "pb.SmartAuth",
  295. HandlerType: (*SmartAuthServer)(nil),
  296. Methods: []grpc.MethodDesc{
  297. {
  298. MethodName: "DeviceInfo",
  299. Handler: _SmartAuth_DeviceInfo_Handler,
  300. },
  301. {
  302. MethodName: "DeviceInfoById",
  303. Handler: _SmartAuth_DeviceInfoById_Handler,
  304. },
  305. {
  306. MethodName: "DeviceStatusUpdate",
  307. Handler: _SmartAuth_DeviceStatusUpdate_Handler,
  308. },
  309. {
  310. MethodName: "DeviceParamSet",
  311. Handler: _SmartAuth_DeviceParamSet_Handler,
  312. },
  313. {
  314. MethodName: "DeviceChangeNotify",
  315. Handler: _SmartAuth_DeviceChangeNotify_Handler,
  316. },
  317. {
  318. MethodName: "GetAllDustSn",
  319. Handler: _SmartAuth_GetAllDustSn_Handler,
  320. },
  321. {
  322. MethodName: "DelDevice",
  323. Handler: _SmartAuth_DelDevice_Handler,
  324. },
  325. },
  326. Streams: []grpc.StreamDesc{},
  327. Metadata: "smart_auth.proto",
  328. }