thirdparty_management.pb.go 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: thirdparty_management.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-alarm/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("thirdparty_management.proto", fileDescriptor_f3d34336399aea71)
  26. }
  27. var fileDescriptor_f3d34336399aea71 = []byte{
  28. // 138 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0xc9, 0xc8, 0x2c,
  30. 0x4a, 0x29, 0x48, 0x2c, 0x2a, 0xa9, 0x8c, 0xcf, 0x4d, 0xcc, 0x4b, 0x4c, 0x4f, 0xcd, 0x4d, 0xcd,
  31. 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x92, 0x12, 0x2e, 0x33, 0xd4,
  32. 0x47, 0xa8, 0x81, 0x48, 0x18, 0xf9, 0x71, 0x09, 0x07, 0xe7, 0x26, 0x16, 0x95, 0x04, 0x67, 0x96,
  33. 0xa4, 0x86, 0xc0, 0x25, 0x85, 0xcc, 0xb9, 0x38, 0x83, 0x53, 0xf3, 0x52, 0x1c, 0x73, 0x12, 0x8b,
  34. 0x72, 0x85, 0x44, 0xf4, 0xca, 0x0c, 0xf5, 0xe0, 0xdc, 0xa0, 0xd4, 0xc2, 0xd2, 0xd4, 0xe2, 0x12,
  35. 0x29, 0x21, 0x34, 0xd1, 0x82, 0x9c, 0x4a, 0x25, 0x06, 0x27, 0x81, 0x28, 0xbe, 0x62, 0x90, 0x79,
  36. 0xba, 0x89, 0x20, 0x51, 0xfd, 0x82, 0xa4, 0x24, 0x36, 0xb0, 0x45, 0xc6, 0x80, 0x00, 0x00, 0x00,
  37. 0xff, 0xff, 0xc2, 0x53, 0xa9, 0x5a, 0xa0, 0x00, 0x00, 0x00,
  38. }
  39. // Reference imports to suppress errors if they are not otherwise used.
  40. var _ context.Context
  41. var _ grpc.ClientConnInterface
  42. // This is a compile-time assertion to ensure that this generated file
  43. // is compatible with the grpc package it is being compiled against.
  44. const _ = grpc.SupportPackageIsVersion6
  45. // SmartSiteThirdpartyClient is the client API for SmartSiteThirdparty service.
  46. //
  47. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  48. type SmartSiteThirdpartyClient interface {
  49. // 发送告警
  50. SendAlarm(ctx context.Context, in *v1.SendAlarmRequest, opts ...grpc.CallOption) (*v1.SendAlarmReply, error)
  51. }
  52. type smartSiteThirdpartyClient struct {
  53. cc grpc.ClientConnInterface
  54. }
  55. func NewSmartSiteThirdpartyClient(cc grpc.ClientConnInterface) SmartSiteThirdpartyClient {
  56. return &smartSiteThirdpartyClient{cc}
  57. }
  58. func (c *smartSiteThirdpartyClient) SendAlarm(ctx context.Context, in *v1.SendAlarmRequest, opts ...grpc.CallOption) (*v1.SendAlarmReply, error) {
  59. out := new(v1.SendAlarmReply)
  60. err := c.cc.Invoke(ctx, "/pb.SmartSiteThirdparty/SendAlarm", in, out, opts...)
  61. if err != nil {
  62. return nil, err
  63. }
  64. return out, nil
  65. }
  66. // SmartSiteThirdpartyServer is the server API for SmartSiteThirdparty service.
  67. type SmartSiteThirdpartyServer interface {
  68. // 发送告警
  69. SendAlarm(context.Context, *v1.SendAlarmRequest) (*v1.SendAlarmReply, error)
  70. }
  71. // UnimplementedSmartSiteThirdpartyServer can be embedded to have forward compatible implementations.
  72. type UnimplementedSmartSiteThirdpartyServer struct {
  73. }
  74. func (*UnimplementedSmartSiteThirdpartyServer) SendAlarm(ctx context.Context, req *v1.SendAlarmRequest) (*v1.SendAlarmReply, error) {
  75. return nil, status.Errorf(codes.Unimplemented, "method SendAlarm not implemented")
  76. }
  77. func RegisterSmartSiteThirdpartyServer(s *grpc.Server, srv SmartSiteThirdpartyServer) {
  78. s.RegisterService(&_SmartSiteThirdparty_serviceDesc, srv)
  79. }
  80. func _SmartSiteThirdparty_SendAlarm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  81. in := new(v1.SendAlarmRequest)
  82. if err := dec(in); err != nil {
  83. return nil, err
  84. }
  85. if interceptor == nil {
  86. return srv.(SmartSiteThirdpartyServer).SendAlarm(ctx, in)
  87. }
  88. info := &grpc.UnaryServerInfo{
  89. Server: srv,
  90. FullMethod: "/pb.SmartSiteThirdparty/SendAlarm",
  91. }
  92. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  93. return srv.(SmartSiteThirdpartyServer).SendAlarm(ctx, req.(*v1.SendAlarmRequest))
  94. }
  95. return interceptor(ctx, in, info, handler)
  96. }
  97. var _SmartSiteThirdparty_serviceDesc = grpc.ServiceDesc{
  98. ServiceName: "pb.SmartSiteThirdparty",
  99. HandlerType: (*SmartSiteThirdpartyServer)(nil),
  100. Methods: []grpc.MethodDesc{
  101. {
  102. MethodName: "SendAlarm",
  103. Handler: _SmartSiteThirdparty_SendAlarm_Handler,
  104. },
  105. },
  106. Streams: []grpc.StreamDesc{},
  107. Metadata: "thirdparty_management.proto",
  108. }