device_service.pb.go 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: device_service.proto
  3. // package声明符,用来防止不同的消息类型有命名冲突
  4. package pb
  5. import (
  6. context "context"
  7. v1 "cp-organization-management/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("device_service.proto", fileDescriptor_5b575c291bff7431)
  26. }
  27. var fileDescriptor_5b575c291bff7431 = []byte{
  28. // 143 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x49, 0x49, 0x2d, 0xcb,
  30. 0x4c, 0x4e, 0x8d, 0x2f, 0x4e, 0x2d, 0x02, 0xd1, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x5c,
  31. 0x05, 0x49, 0x7a, 0x50, 0x11, 0x29, 0xfe, 0x32, 0x43, 0x7d, 0x88, 0x22, 0x88, 0xa4, 0x51, 0x00,
  32. 0x17, 0x9b, 0x0b, 0x98, 0x2f, 0xe4, 0xc6, 0xc5, 0xe3, 0x99, 0x97, 0x59, 0x02, 0xe1, 0xb9, 0x24,
  33. 0x09, 0x49, 0xe9, 0x15, 0x24, 0xc5, 0x97, 0x19, 0xea, 0x21, 0x0b, 0x06, 0xa5, 0x16, 0x96, 0xa6,
  34. 0x16, 0x97, 0x48, 0x49, 0x60, 0x95, 0x2b, 0xc8, 0xa9, 0x54, 0x62, 0x70, 0x92, 0x8f, 0x92, 0x4d,
  35. 0x2e, 0xd0, 0xcd, 0x2f, 0x4a, 0x4f, 0xcc, 0xcb, 0xac, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0xcd,
  36. 0x4d, 0xcc, 0x4b, 0x4c, 0x4f, 0xcd, 0x4d, 0xcd, 0x2b, 0xd1, 0x2f, 0x48, 0x4a, 0x62, 0x03, 0xdb,
  37. 0x6c, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x17, 0x75, 0x98, 0xd7, 0xae, 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. // DeviceClient is the client API for Device 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 DeviceClient interface {
  49. InitDeviceDb(ctx context.Context, in *v1.InitDeviceDbRequest, opts ...grpc.CallOption) (*v1.InitDeviceDbReply, error)
  50. }
  51. type deviceClient struct {
  52. cc grpc.ClientConnInterface
  53. }
  54. func NewDeviceClient(cc grpc.ClientConnInterface) DeviceClient {
  55. return &deviceClient{cc}
  56. }
  57. func (c *deviceClient) InitDeviceDb(ctx context.Context, in *v1.InitDeviceDbRequest, opts ...grpc.CallOption) (*v1.InitDeviceDbReply, error) {
  58. out := new(v1.InitDeviceDbReply)
  59. err := c.cc.Invoke(ctx, "/pb.service.Device/InitDeviceDb", in, out, opts...)
  60. if err != nil {
  61. return nil, err
  62. }
  63. return out, nil
  64. }
  65. // DeviceServer is the server API for Device service.
  66. type DeviceServer interface {
  67. InitDeviceDb(context.Context, *v1.InitDeviceDbRequest) (*v1.InitDeviceDbReply, error)
  68. }
  69. // UnimplementedDeviceServer can be embedded to have forward compatible implementations.
  70. type UnimplementedDeviceServer struct {
  71. }
  72. func (*UnimplementedDeviceServer) InitDeviceDb(ctx context.Context, req *v1.InitDeviceDbRequest) (*v1.InitDeviceDbReply, error) {
  73. return nil, status.Errorf(codes.Unimplemented, "method InitDeviceDb not implemented")
  74. }
  75. func RegisterDeviceServer(s *grpc.Server, srv DeviceServer) {
  76. s.RegisterService(&_Device_serviceDesc, srv)
  77. }
  78. func _Device_InitDeviceDb_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  79. in := new(v1.InitDeviceDbRequest)
  80. if err := dec(in); err != nil {
  81. return nil, err
  82. }
  83. if interceptor == nil {
  84. return srv.(DeviceServer).InitDeviceDb(ctx, in)
  85. }
  86. info := &grpc.UnaryServerInfo{
  87. Server: srv,
  88. FullMethod: "/pb.service.Device/InitDeviceDb",
  89. }
  90. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  91. return srv.(DeviceServer).InitDeviceDb(ctx, req.(*v1.InitDeviceDbRequest))
  92. }
  93. return interceptor(ctx, in, info, handler)
  94. }
  95. var _Device_serviceDesc = grpc.ServiceDesc{
  96. ServiceName: "pb.service.Device",
  97. HandlerType: (*DeviceServer)(nil),
  98. Methods: []grpc.MethodDesc{
  99. {
  100. MethodName: "InitDeviceDb",
  101. Handler: _Device_InitDeviceDb_Handler,
  102. },
  103. },
  104. Streams: []grpc.StreamDesc{},
  105. Metadata: "device_service.proto",
  106. }