feat: user logout
CI / changes (push) Successful in 1m30s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / aiserver (push) Successful in 0s
CI / analysis (push) Successful in 35s
CI / bff (push) Successful in 19s
CI / chore (push) Successful in 1s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 1s
CI / product (push) Successful in 0s
CI / record (push) Successful in 1s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 24s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
CI / changes (push) Successful in 1m30s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / aiserver (push) Successful in 0s
CI / analysis (push) Successful in 35s
CI / bff (push) Successful in 19s
CI / chore (push) Successful in 1s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 0s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 1s
CI / product (push) Successful in 0s
CI / record (push) Successful in 1s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 24s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
This commit is contained in:
@@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
User_Login_FullMethodName = "/user.User/Login"
|
||||
User_Logout_FullMethodName = "/user.User/Logout"
|
||||
User_GenerateQrcode_FullMethodName = "/user.User/GenerateQrcode"
|
||||
User_QrcodeScan_FullMethodName = "/user.User/QrcodeScan"
|
||||
User_QrcodeLogin_FullMethodName = "/user.User/QrcodeLogin"
|
||||
@@ -51,6 +52,7 @@ const (
|
||||
// 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.
|
||||
type UserClient interface {
|
||||
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Logout(ctx context.Context, in *LogoutReq, opts ...grpc.CallOption) (*Response, error)
|
||||
GenerateQrcode(ctx context.Context, in *GenerateQrcodeReq, opts ...grpc.CallOption) (*Response, error)
|
||||
QrcodeScan(ctx context.Context, in *QrcodeScanReq, opts ...grpc.CallOption) (*Response, error)
|
||||
QrcodeLogin(ctx context.Context, in *QrcodeLoginReq, opts ...grpc.CallOption) (*Response, error)
|
||||
@@ -95,6 +97,16 @@ func (c *userClient) Login(ctx context.Context, in *LoginReq, opts ...grpc.CallO
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) Logout(ctx context.Context, in *LogoutReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, User_Logout_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) GenerateQrcode(ctx context.Context, in *GenerateQrcodeReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
@@ -340,6 +352,7 @@ func (c *userClient) InternalLoginByUserId(ctx context.Context, in *InternalLogi
|
||||
// for forward compatibility.
|
||||
type UserServer interface {
|
||||
Login(context.Context, *LoginReq) (*Response, error)
|
||||
Logout(context.Context, *LogoutReq) (*Response, error)
|
||||
GenerateQrcode(context.Context, *GenerateQrcodeReq) (*Response, error)
|
||||
QrcodeScan(context.Context, *QrcodeScanReq) (*Response, error)
|
||||
QrcodeLogin(context.Context, *QrcodeLoginReq) (*Response, error)
|
||||
@@ -377,6 +390,9 @@ type UnimplementedUserServer struct{}
|
||||
func (UnimplementedUserServer) Login(context.Context, *LoginReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Login not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) Logout(context.Context, *LogoutReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Logout not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) GenerateQrcode(context.Context, *GenerateQrcodeReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GenerateQrcode not implemented")
|
||||
}
|
||||
@@ -488,6 +504,24 @@ func _User_Login_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_Logout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LogoutReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).Logout(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_Logout_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).Logout(ctx, req.(*LogoutReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_GenerateQrcode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GenerateQrcodeReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -931,6 +965,10 @@ var User_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Login",
|
||||
Handler: _User_Login_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Logout",
|
||||
Handler: _User_Logout_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GenerateQrcode",
|
||||
Handler: _User_GenerateQrcode_Handler,
|
||||
|
||||
Reference in New Issue
Block a user