sso_grpc.pb.go 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.5.1
  4. // - protoc v5.28.0--rc2
  5. // source: rpc/protos/sso.proto
  6. //protoc --go_out=. --go-grpc_out=. rpc/protos/sso.proto
  7. package sso
  8. import (
  9. context "context"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. )
  14. // This is a compile-time assertion to ensure that this generated file
  15. // is compatible with the grpc package it is being compiled against.
  16. // Requires gRPC-Go v1.64.0 or later.
  17. const _ = grpc.SupportPackageIsVersion9
  18. const (
  19. SSOLogin_Login_FullMethodName = "/rpc.SSOLogin/Login"
  20. )
  21. // SSOLoginClient is the client API for SSOLogin service.
  22. //
  23. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  24. type SSOLoginClient interface {
  25. Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
  26. }
  27. type sSOLoginClient struct {
  28. cc grpc.ClientConnInterface
  29. }
  30. func NewSSOLoginClient(cc grpc.ClientConnInterface) SSOLoginClient {
  31. return &sSOLoginClient{cc}
  32. }
  33. func (c *sSOLoginClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
  34. cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
  35. out := new(LoginResponse)
  36. err := c.cc.Invoke(ctx, SSOLogin_Login_FullMethodName, in, out, cOpts...)
  37. if err != nil {
  38. return nil, err
  39. }
  40. return out, nil
  41. }
  42. // SSOLoginServer is the server API for SSOLogin service.
  43. // All implementations must embed UnimplementedSSOLoginServer
  44. // for forward compatibility.
  45. type SSOLoginServer interface {
  46. Login(context.Context, *LoginRequest) (*LoginResponse, error)
  47. mustEmbedUnimplementedSSOLoginServer()
  48. }
  49. // UnimplementedSSOLoginServer must be embedded to have
  50. // forward compatible implementations.
  51. //
  52. // NOTE: this should be embedded by value instead of pointer to avoid a nil
  53. // pointer dereference when methods are called.
  54. type UnimplementedSSOLoginServer struct{}
  55. func (UnimplementedSSOLoginServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
  56. return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
  57. }
  58. func (UnimplementedSSOLoginServer) mustEmbedUnimplementedSSOLoginServer() {}
  59. func (UnimplementedSSOLoginServer) testEmbeddedByValue() {}
  60. // UnsafeSSOLoginServer may be embedded to opt out of forward compatibility for this service.
  61. // Use of this interface is not recommended, as added methods to SSOLoginServer will
  62. // result in compilation errors.
  63. type UnsafeSSOLoginServer interface {
  64. mustEmbedUnimplementedSSOLoginServer()
  65. }
  66. func RegisterSSOLoginServer(s grpc.ServiceRegistrar, srv SSOLoginServer) {
  67. // If the following call pancis, it indicates UnimplementedSSOLoginServer was
  68. // embedded by pointer and is nil. This will cause panics if an
  69. // unimplemented method is ever invoked, so we test this at initialization
  70. // time to prevent it from happening at runtime later due to I/O.
  71. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
  72. t.testEmbeddedByValue()
  73. }
  74. s.RegisterService(&SSOLogin_ServiceDesc, srv)
  75. }
  76. func _SSOLogin_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  77. in := new(LoginRequest)
  78. if err := dec(in); err != nil {
  79. return nil, err
  80. }
  81. if interceptor == nil {
  82. return srv.(SSOLoginServer).Login(ctx, in)
  83. }
  84. info := &grpc.UnaryServerInfo{
  85. Server: srv,
  86. FullMethod: SSOLogin_Login_FullMethodName,
  87. }
  88. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  89. return srv.(SSOLoginServer).Login(ctx, req.(*LoginRequest))
  90. }
  91. return interceptor(ctx, in, info, handler)
  92. }
  93. // SSOLogin_ServiceDesc is the grpc.ServiceDesc for SSOLogin service.
  94. // It's only intended for direct use with grpc.RegisterService,
  95. // and not to be introspected or modified (even as a copy)
  96. var SSOLogin_ServiceDesc = grpc.ServiceDesc{
  97. ServiceName: "rpc.SSOLogin",
  98. HandlerType: (*SSOLoginServer)(nil),
  99. Methods: []grpc.MethodDesc{
  100. {
  101. MethodName: "Login",
  102. Handler: _SSOLogin_Login_Handler,
  103. },
  104. },
  105. Streams: []grpc.StreamDesc{},
  106. Metadata: "rpc/protos/sso.proto",
  107. }