thirdparty_service.pb.go 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: thirdparty_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-system-gateway/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_service.proto", fileDescriptor_22d5d2ee5c1185d0)
  26. }
  27. var fileDescriptor_22d5d2ee5c1185d0 = []byte{
  28. // 174 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0xc9, 0xc8, 0x2c,
  30. 0x4a, 0x29, 0x48, 0x2c, 0x2a, 0xa9, 0x8c, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b,
  31. 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2a, 0x48, 0xd2, 0x83, 0x8a, 0x48, 0x09, 0x97, 0x19, 0xea,
  32. 0x23, 0x14, 0x42, 0x14, 0x18, 0x4d, 0x62, 0xe4, 0x12, 0x0a, 0x28, 0xca, 0x2f, 0x48, 0x2d, 0x2a,
  33. 0xa9, 0x0c, 0x81, 0x4b, 0x0a, 0x59, 0x71, 0x71, 0xb8, 0xa7, 0x96, 0x84, 0x25, 0xe7, 0xa7, 0xa4,
  34. 0x0a, 0x89, 0xe9, 0x15, 0x24, 0xc5, 0x97, 0x19, 0xea, 0xc1, 0x04, 0x82, 0x52, 0x0b, 0x4b, 0x53,
  35. 0x8b, 0x4b, 0xa4, 0x44, 0x30, 0xc4, 0x0b, 0x72, 0x2a, 0x95, 0x18, 0x84, 0x1c, 0xb8, 0xb8, 0x9c,
  36. 0x33, 0x52, 0x93, 0xb3, 0x21, 0xba, 0x25, 0xa0, 0xaa, 0x10, 0x42, 0x30, 0xfd, 0x62, 0x58, 0x64,
  37. 0xc0, 0x26, 0x38, 0xc9, 0x44, 0x49, 0x15, 0x40, 0xdd, 0xa4, 0x5b, 0x5c, 0x59, 0x5c, 0x92, 0x9a,
  38. 0xab, 0x9b, 0x9e, 0x58, 0x92, 0x5a, 0x9e, 0x58, 0xa9, 0x5f, 0x90, 0x94, 0xc4, 0x06, 0x76, 0xb9,
  39. 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x72, 0x4c, 0x73, 0xf6, 0x00, 0x00, 0x00,
  40. }
  41. // Reference imports to suppress errors if they are not otherwise used.
  42. var _ context.Context
  43. var _ grpc.ClientConnInterface
  44. // This is a compile-time assertion to ensure that this generated file
  45. // is compatible with the grpc package it is being compiled against.
  46. const _ = grpc.SupportPackageIsVersion6
  47. // PropertyThirdpartyClient is the client API for PropertyThirdparty service.
  48. //
  49. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  50. type PropertyThirdpartyClient interface {
  51. // 获取短信验证码
  52. GetVcode(ctx context.Context, in *v1.GetVcodeRequest, opts ...grpc.CallOption) (*v1.GetVcodeReply, error)
  53. // 校验短信验证码
  54. CheckVcode(ctx context.Context, in *v1.CheckVcodeRequest, opts ...grpc.CallOption) (*v1.CheckVcodeReply, error)
  55. }
  56. type propertyThirdpartyClient struct {
  57. cc grpc.ClientConnInterface
  58. }
  59. func NewPropertyThirdpartyClient(cc grpc.ClientConnInterface) PropertyThirdpartyClient {
  60. return &propertyThirdpartyClient{cc}
  61. }
  62. func (c *propertyThirdpartyClient) GetVcode(ctx context.Context, in *v1.GetVcodeRequest, opts ...grpc.CallOption) (*v1.GetVcodeReply, error) {
  63. out := new(v1.GetVcodeReply)
  64. err := c.cc.Invoke(ctx, "/pb.service.PropertyThirdparty/GetVcode", in, out, opts...)
  65. if err != nil {
  66. return nil, err
  67. }
  68. return out, nil
  69. }
  70. func (c *propertyThirdpartyClient) CheckVcode(ctx context.Context, in *v1.CheckVcodeRequest, opts ...grpc.CallOption) (*v1.CheckVcodeReply, error) {
  71. out := new(v1.CheckVcodeReply)
  72. err := c.cc.Invoke(ctx, "/pb.service.PropertyThirdparty/CheckVcode", in, out, opts...)
  73. if err != nil {
  74. return nil, err
  75. }
  76. return out, nil
  77. }
  78. // PropertyThirdpartyServer is the server API for PropertyThirdparty service.
  79. type PropertyThirdpartyServer interface {
  80. // 获取短信验证码
  81. GetVcode(context.Context, *v1.GetVcodeRequest) (*v1.GetVcodeReply, error)
  82. // 校验短信验证码
  83. CheckVcode(context.Context, *v1.CheckVcodeRequest) (*v1.CheckVcodeReply, error)
  84. }
  85. // UnimplementedPropertyThirdpartyServer can be embedded to have forward compatible implementations.
  86. type UnimplementedPropertyThirdpartyServer struct {
  87. }
  88. func (*UnimplementedPropertyThirdpartyServer) GetVcode(ctx context.Context, req *v1.GetVcodeRequest) (*v1.GetVcodeReply, error) {
  89. return nil, status.Errorf(codes.Unimplemented, "method GetVcode not implemented")
  90. }
  91. func (*UnimplementedPropertyThirdpartyServer) CheckVcode(ctx context.Context, req *v1.CheckVcodeRequest) (*v1.CheckVcodeReply, error) {
  92. return nil, status.Errorf(codes.Unimplemented, "method CheckVcode not implemented")
  93. }
  94. func RegisterPropertyThirdpartyServer(s *grpc.Server, srv PropertyThirdpartyServer) {
  95. s.RegisterService(&_PropertyThirdparty_serviceDesc, srv)
  96. }
  97. func _PropertyThirdparty_GetVcode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  98. in := new(v1.GetVcodeRequest)
  99. if err := dec(in); err != nil {
  100. return nil, err
  101. }
  102. if interceptor == nil {
  103. return srv.(PropertyThirdpartyServer).GetVcode(ctx, in)
  104. }
  105. info := &grpc.UnaryServerInfo{
  106. Server: srv,
  107. FullMethod: "/pb.service.PropertyThirdparty/GetVcode",
  108. }
  109. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  110. return srv.(PropertyThirdpartyServer).GetVcode(ctx, req.(*v1.GetVcodeRequest))
  111. }
  112. return interceptor(ctx, in, info, handler)
  113. }
  114. func _PropertyThirdparty_CheckVcode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  115. in := new(v1.CheckVcodeRequest)
  116. if err := dec(in); err != nil {
  117. return nil, err
  118. }
  119. if interceptor == nil {
  120. return srv.(PropertyThirdpartyServer).CheckVcode(ctx, in)
  121. }
  122. info := &grpc.UnaryServerInfo{
  123. Server: srv,
  124. FullMethod: "/pb.service.PropertyThirdparty/CheckVcode",
  125. }
  126. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  127. return srv.(PropertyThirdpartyServer).CheckVcode(ctx, req.(*v1.CheckVcodeRequest))
  128. }
  129. return interceptor(ctx, in, info, handler)
  130. }
  131. var _PropertyThirdparty_serviceDesc = grpc.ServiceDesc{
  132. ServiceName: "pb.service.PropertyThirdparty",
  133. HandlerType: (*PropertyThirdpartyServer)(nil),
  134. Methods: []grpc.MethodDesc{
  135. {
  136. MethodName: "GetVcode",
  137. Handler: _PropertyThirdparty_GetVcode_Handler,
  138. },
  139. {
  140. MethodName: "CheckVcode",
  141. Handler: _PropertyThirdparty_CheckVcode_Handler,
  142. },
  143. },
  144. Streams: []grpc.StreamDesc{},
  145. Metadata: "thirdparty_service.proto",
  146. }