company_service.pb.go 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: company_service.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 "property-management/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("company_service.proto", fileDescriptor_cfe012e92534f5dd)
  26. }
  27. var fileDescriptor_cfe012e92534f5dd = []byte{
  28. // 139 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0xce, 0xcf, 0x2d,
  30. 0x48, 0xcc, 0xab, 0x8c, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f,
  31. 0xc9, 0x17, 0xe2, 0x2a, 0x48, 0xd2, 0x83, 0x8a, 0x48, 0x09, 0x94, 0x19, 0xea, 0x43, 0x55, 0x41,
  32. 0x64, 0x8d, 0x9c, 0xb8, 0xd8, 0x9d, 0x21, 0x02, 0x42, 0xe6, 0x5c, 0xec, 0x8e, 0x05, 0x05, 0x45,
  33. 0xf9, 0x65, 0xa9, 0x42, 0xa2, 0x7a, 0x05, 0x49, 0xf1, 0x65, 0x86, 0x7a, 0x50, 0x7e, 0x50, 0x6a,
  34. 0x61, 0x69, 0x6a, 0x71, 0x89, 0x94, 0x30, 0xba, 0x70, 0x41, 0x4e, 0xa5, 0x12, 0x83, 0x93, 0x44,
  35. 0x94, 0x58, 0x41, 0x51, 0x7e, 0x41, 0x6a, 0x51, 0x49, 0xa5, 0x6e, 0x6e, 0x62, 0x5e, 0x62, 0x7a,
  36. 0x6a, 0x6e, 0x6a, 0x5e, 0x89, 0x7e, 0x41, 0x52, 0x12, 0x1b, 0xd8, 0x12, 0x63, 0x40, 0x00, 0x00,
  37. 0x00, 0xff, 0xff, 0x12, 0xb8, 0x4e, 0xc6, 0x9b, 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. // CompanyClient is the client API for Company 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 CompanyClient interface {
  49. // 创建系统用户
  50. Approve(ctx context.Context, in *v1.ApproveRequest, opts ...grpc.CallOption) (*v1.ApproveReply, error)
  51. }
  52. type companyClient struct {
  53. cc grpc.ClientConnInterface
  54. }
  55. func NewCompanyClient(cc grpc.ClientConnInterface) CompanyClient {
  56. return &companyClient{cc}
  57. }
  58. func (c *companyClient) Approve(ctx context.Context, in *v1.ApproveRequest, opts ...grpc.CallOption) (*v1.ApproveReply, error) {
  59. out := new(v1.ApproveReply)
  60. err := c.cc.Invoke(ctx, "/pb.service.Company/Approve", in, out, opts...)
  61. if err != nil {
  62. return nil, err
  63. }
  64. return out, nil
  65. }
  66. // CompanyServer is the server API for Company service.
  67. type CompanyServer interface {
  68. // 创建系统用户
  69. Approve(context.Context, *v1.ApproveRequest) (*v1.ApproveReply, error)
  70. }
  71. // UnimplementedCompanyServer can be embedded to have forward compatible implementations.
  72. type UnimplementedCompanyServer struct {
  73. }
  74. func (*UnimplementedCompanyServer) Approve(ctx context.Context, req *v1.ApproveRequest) (*v1.ApproveReply, error) {
  75. return nil, status.Errorf(codes.Unimplemented, "method Approve not implemented")
  76. }
  77. func RegisterCompanyServer(s *grpc.Server, srv CompanyServer) {
  78. s.RegisterService(&_Company_serviceDesc, srv)
  79. }
  80. func _Company_Approve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  81. in := new(v1.ApproveRequest)
  82. if err := dec(in); err != nil {
  83. return nil, err
  84. }
  85. if interceptor == nil {
  86. return srv.(CompanyServer).Approve(ctx, in)
  87. }
  88. info := &grpc.UnaryServerInfo{
  89. Server: srv,
  90. FullMethod: "/pb.service.Company/Approve",
  91. }
  92. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  93. return srv.(CompanyServer).Approve(ctx, req.(*v1.ApproveRequest))
  94. }
  95. return interceptor(ctx, in, info, handler)
  96. }
  97. var _Company_serviceDesc = grpc.ServiceDesc{
  98. ServiceName: "pb.service.Company",
  99. HandlerType: (*CompanyServer)(nil),
  100. Methods: []grpc.MethodDesc{
  101. {
  102. MethodName: "Approve",
  103. Handler: _Company_Approve_Handler,
  104. },
  105. },
  106. Streams: []grpc.StreamDesc{},
  107. Metadata: "company_service.proto",
  108. }