mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-09 15:58:48 +00:00
Add EntryType enum
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
|
|
||||||
__all__ = ["PasswordManager", "ConfigManager", "Vault"]
|
__all__ = ["PasswordManager", "ConfigManager", "Vault", "EntryType"]
|
||||||
|
|
||||||
|
|
||||||
def __getattr__(name: str):
|
def __getattr__(name: str):
|
||||||
@@ -14,4 +14,6 @@ def __getattr__(name: str):
|
|||||||
return import_module(".config_manager", __name__).ConfigManager
|
return import_module(".config_manager", __name__).ConfigManager
|
||||||
if name == "Vault":
|
if name == "Vault":
|
||||||
return import_module(".vault", __name__).Vault
|
return import_module(".vault", __name__).Vault
|
||||||
|
if name == "EntryType":
|
||||||
|
return import_module(".entry_types", __name__).EntryType
|
||||||
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
||||||
|
13
src/password_manager/entry_types.py
Normal file
13
src/password_manager/entry_types.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# password_manager/entry_types.py
|
||||||
|
"""Enumerations for entry types used by SeedPass."""
|
||||||
|
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class EntryType(str, Enum):
|
||||||
|
"""Enumeration of different entry types supported by the manager."""
|
||||||
|
|
||||||
|
PASSWORD = "password"
|
||||||
|
TOTP = "totp"
|
||||||
|
SSH = "ssh"
|
||||||
|
SEED = "seed"
|
Reference in New Issue
Block a user