from abc import ABC, abstractmethod from dataclasses import dataclass, field from datetime import datetime @dataclass class VPNUserInfo: vpn_id: str internal_id: int server_id: int name: str is_enabled: bool access_config: str | None = None bytes_used: int = 0 data_limit: int | None = None created_at: datetime | None = None class VPNProvider(ABC): @abstractmethod async def create_user( self, internal_id: int, server_id: int, name: str, ) -> VPNUserInfo: ... @abstractmethod async def delete_user(self, vpn_id: str) -> bool: ... @abstractmethod async def enable_user(self, vpn_id: str) -> bool: ... @abstractmethod async def disable_user(self, vpn_id: str) -> bool: ... @abstractmethod async def get_user(self, vpn_id: str) -> VPNUserInfo | None: ...