smart_alarm.pb.go 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: smart_alarm.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 "lift-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_alarm.proto", fileDescriptor_893604fd7e902205)
  26. }
  27. var fileDescriptor_893604fd7e902205 = []byte{
  28. // 122 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0xce, 0x4d, 0x2c,
  30. 0x2a, 0x89, 0x4f, 0xcc, 0x49, 0x2c, 0xca, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a,
  31. 0x48, 0x92, 0xe2, 0x2b, 0x33, 0xd4, 0x47, 0x12, 0x33, 0x72, 0xe2, 0xe2, 0x0a, 0x06, 0x29, 0x74,
  32. 0x04, 0x89, 0x09, 0x99, 0x70, 0x71, 0x80, 0x19, 0x8e, 0x29, 0x29, 0x42, 0xc2, 0x7a, 0x65, 0x86,
  33. 0x7a, 0x30, 0x5e, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x94, 0x20, 0xaa, 0x60, 0x41, 0x4e,
  34. 0xa5, 0x12, 0x83, 0x93, 0x50, 0x94, 0x40, 0x49, 0x7e, 0x79, 0x6a, 0x91, 0x6e, 0x6e, 0x7e, 0x5e,
  35. 0x66, 0x49, 0x7e, 0x91, 0x7e, 0x41, 0x52, 0x12, 0x1b, 0xd8, 0x78, 0x63, 0x40, 0x00, 0x00, 0x00,
  36. 0xff, 0xff, 0xa2, 0x0a, 0x46, 0xaa, 0x87, 0x00, 0x00, 0x00,
  37. }
  38. // Reference imports to suppress errors if they are not otherwise used.
  39. var _ context.Context
  40. var _ grpc.ClientConnInterface
  41. // This is a compile-time assertion to ensure that this generated file
  42. // is compatible with the grpc package it is being compiled against.
  43. const _ = grpc.SupportPackageIsVersion6
  44. // SmartAlarmClient is the client API for SmartAlarm service.
  45. //
  46. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  47. type SmartAlarmClient interface {
  48. // 新增告警
  49. AlarmAdd(ctx context.Context, in *v1.AlarmAddRequest, opts ...grpc.CallOption) (*v1.AlarmAddReply, error)
  50. }
  51. type smartAlarmClient struct {
  52. cc grpc.ClientConnInterface
  53. }
  54. func NewSmartAlarmClient(cc grpc.ClientConnInterface) SmartAlarmClient {
  55. return &smartAlarmClient{cc}
  56. }
  57. func (c *smartAlarmClient) AlarmAdd(ctx context.Context, in *v1.AlarmAddRequest, opts ...grpc.CallOption) (*v1.AlarmAddReply, error) {
  58. out := new(v1.AlarmAddReply)
  59. err := c.cc.Invoke(ctx, "/pb.SmartAlarm/AlarmAdd", in, out, opts...)
  60. if err != nil {
  61. return nil, err
  62. }
  63. return out, nil
  64. }
  65. // SmartAlarmServer is the server API for SmartAlarm service.
  66. type SmartAlarmServer interface {
  67. // 新增告警
  68. AlarmAdd(context.Context, *v1.AlarmAddRequest) (*v1.AlarmAddReply, error)
  69. }
  70. // UnimplementedSmartAlarmServer can be embedded to have forward compatible implementations.
  71. type UnimplementedSmartAlarmServer struct {
  72. }
  73. func (*UnimplementedSmartAlarmServer) AlarmAdd(ctx context.Context, req *v1.AlarmAddRequest) (*v1.AlarmAddReply, error) {
  74. return nil, status.Errorf(codes.Unimplemented, "method AlarmAdd not implemented")
  75. }
  76. func RegisterSmartAlarmServer(s *grpc.Server, srv SmartAlarmServer) {
  77. s.RegisterService(&_SmartAlarm_serviceDesc, srv)
  78. }
  79. func _SmartAlarm_AlarmAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  80. in := new(v1.AlarmAddRequest)
  81. if err := dec(in); err != nil {
  82. return nil, err
  83. }
  84. if interceptor == nil {
  85. return srv.(SmartAlarmServer).AlarmAdd(ctx, in)
  86. }
  87. info := &grpc.UnaryServerInfo{
  88. Server: srv,
  89. FullMethod: "/pb.SmartAlarm/AlarmAdd",
  90. }
  91. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  92. return srv.(SmartAlarmServer).AlarmAdd(ctx, req.(*v1.AlarmAddRequest))
  93. }
  94. return interceptor(ctx, in, info, handler)
  95. }
  96. var _SmartAlarm_serviceDesc = grpc.ServiceDesc{
  97. ServiceName: "pb.SmartAlarm",
  98. HandlerType: (*SmartAlarmServer)(nil),
  99. Methods: []grpc.MethodDesc{
  100. {
  101. MethodName: "AlarmAdd",
  102. Handler: _SmartAlarm_AlarmAdd_Handler,
  103. },
  104. },
  105. Streams: []grpc.StreamDesc{},
  106. Metadata: "smart_alarm.proto",
  107. }