package hubrpc import ( context "context" "gitlink.org.cn/cloudream/jcs-pub/common/pkgs/rpc" cortypes "gitlink.org.cn/cloudream/jcs-pub/coordinator/types" ) type UserSvc interface { NotifyUserAccessTokenInvalid(ctx context.Context, req *NotifyUserAccessTokenInvalid) (*NotifyUserAccessTokenInvalidResp, *rpc.CodeError) } // 通知用户的Token登出 type NotifyUserAccessTokenInvalid struct { UserID cortypes.UserID TokenID cortypes.AccessTokenID } type NotifyUserAccessTokenInvalidResp struct{} func (c *Client) NotifyUserAccessTokenInvalid(ctx context.Context, req *NotifyUserAccessTokenInvalid) (*NotifyUserAccessTokenInvalidResp, *rpc.CodeError) { if c.fusedErr != nil { return nil, c.fusedErr } return rpc.UnaryClient[*NotifyUserAccessTokenInvalidResp](c.cli.NotifyUserAccessTokenInvalid, ctx, req) } func (s *Server) NotifyUserAccessTokenInvalid(ctx context.Context, req *rpc.Request) (*rpc.Response, error) { return rpc.UnaryServer(s.svrImpl.NotifyUserAccessTokenInvalid, ctx, req) }