|
|
|
@ -41,6 +41,8 @@ type AuthClient interface {
|
|
|
|
|
QueryUserPrivacy(ctx context.Context, in *QueryUserPrivacyReq, opts ...grpc.CallOption) (*QueryUserPrivacyResp, error) |
|
|
|
|
// 设置密码
|
|
|
|
|
SetPassword(ctx context.Context, in *SetPasswordReq, opts ...grpc.CallOption) (*common.Empty, error) |
|
|
|
|
// 解散公会删除密码
|
|
|
|
|
DeletePassword(ctx context.Context, in *DeletePasswordReq, opts ...grpc.CallOption) (*common.Empty, error) |
|
|
|
|
// 退出登录
|
|
|
|
|
LogOut(ctx context.Context, in *LogOutReq, opts ...grpc.CallOption) (*common.Empty, error) |
|
|
|
|
// 注销账号
|
|
|
|
@ -152,6 +154,15 @@ func (c *authClient) SetPassword(ctx context.Context, in *SetPasswordReq, opts .
|
|
|
|
|
return out, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *authClient) DeletePassword(ctx context.Context, in *DeletePasswordReq, opts ...grpc.CallOption) (*common.Empty, error) { |
|
|
|
|
out := new(common.Empty) |
|
|
|
|
err := c.cc.Invoke(ctx, "/auth.v1.Auth/DeletePassword", in, out, opts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
return out, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *authClient) LogOut(ctx context.Context, in *LogOutReq, opts ...grpc.CallOption) (*common.Empty, error) { |
|
|
|
|
out := new(common.Empty) |
|
|
|
|
err := c.cc.Invoke(ctx, "/auth.v1.Auth/LogOut", in, out, opts...) |
|
|
|
@ -264,6 +275,8 @@ type AuthServer interface {
|
|
|
|
|
QueryUserPrivacy(context.Context, *QueryUserPrivacyReq) (*QueryUserPrivacyResp, error) |
|
|
|
|
// 设置密码
|
|
|
|
|
SetPassword(context.Context, *SetPasswordReq) (*common.Empty, error) |
|
|
|
|
// 解散公会删除密码
|
|
|
|
|
DeletePassword(context.Context, *DeletePasswordReq) (*common.Empty, error) |
|
|
|
|
// 退出登录
|
|
|
|
|
LogOut(context.Context, *LogOutReq) (*common.Empty, error) |
|
|
|
|
// 注销账号
|
|
|
|
@ -318,6 +331,9 @@ func (UnimplementedAuthServer) QueryUserPrivacy(context.Context, *QueryUserPriva
|
|
|
|
|
func (UnimplementedAuthServer) SetPassword(context.Context, *SetPasswordReq) (*common.Empty, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SetPassword not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedAuthServer) DeletePassword(context.Context, *DeletePasswordReq) (*common.Empty, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeletePassword not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedAuthServer) LogOut(context.Context, *LogOutReq) (*common.Empty, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method LogOut not implemented") |
|
|
|
|
} |
|
|
|
@ -523,6 +539,24 @@ func _Auth_SetPassword_Handler(srv interface{}, ctx context.Context, dec func(in
|
|
|
|
|
return interceptor(ctx, in, info, handler) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func _Auth_DeletePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
|
|
|
in := new(DeletePasswordReq) |
|
|
|
|
if err := dec(in); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
if interceptor == nil { |
|
|
|
|
return srv.(AuthServer).DeletePassword(ctx, in) |
|
|
|
|
} |
|
|
|
|
info := &grpc.UnaryServerInfo{ |
|
|
|
|
Server: srv, |
|
|
|
|
FullMethod: "/auth.v1.Auth/DeletePassword", |
|
|
|
|
} |
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
|
|
|
return srv.(AuthServer).DeletePassword(ctx, req.(*DeletePasswordReq)) |
|
|
|
|
} |
|
|
|
|
return interceptor(ctx, in, info, handler) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func _Auth_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 { |
|
|
|
@ -746,6 +780,10 @@ var Auth_ServiceDesc = grpc.ServiceDesc{
|
|
|
|
|
MethodName: "SetPassword", |
|
|
|
|
Handler: _Auth_SetPassword_Handler, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
MethodName: "DeletePassword", |
|
|
|
|
Handler: _Auth_DeletePassword_Handler, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
MethodName: "LogOut", |
|
|
|
|
Handler: _Auth_LogOut_Handler, |
|
|
|
|