feat: 添加队列相关API

This commit is contained in:
DLmaster361
2025-08-05 00:46:22 +08:00
parent 8e3c62a518
commit 911eb60ae9
6 changed files with 394 additions and 750 deletions

View File

@@ -74,6 +74,22 @@ class OptionsValidator(ConfigValidator):
return value if self.validate(value) else self.options[0]
class UidValidator(ConfigValidator):
"""UID验证器"""
def validate(self, value: str) -> bool:
if value == "":
return True
try:
uuid.UUID(value)
return True
except ValueError:
return False
def correct(self, value: str) -> str:
return ""
class BoolValidator(OptionsValidator):
"""布尔值验证器"""