You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
584 B
29 lines
584 B
from pydantic import BaseModel
|
|
from typing import Optional, List, Any
|
|
|
|
|
|
class CacheMonitorModel(BaseModel):
|
|
"""
|
|
缓存监控信息对应pydantic模型
|
|
"""
|
|
command_stats: Optional[List]
|
|
db_size: Optional[int]
|
|
info: Optional[dict]
|
|
|
|
|
|
class CacheInfoModel(BaseModel):
|
|
"""
|
|
缓存监控对象对应pydantic模型
|
|
"""
|
|
cache_key: Optional[str]
|
|
cache_name: Optional[str]
|
|
cache_value: Optional[Any]
|
|
remark: Optional[str]
|
|
|
|
|
|
class CrudCacheResponse(BaseModel):
|
|
"""
|
|
操作缓存响应模型
|
|
"""
|
|
is_success: bool
|
|
message: str
|
|
|