Files
dns-sync/dns_sync/models.py
T

31 lines
689 B
Python

from dataclasses import dataclass, field
from typing import Any
@dataclass(frozen=True)
class DesiredRecord:
hostname: str
ip: str
record_type: str = "A"
wildcard: bool = False
source: str = ""
source_id: str | None = None
@dataclass(frozen=True)
class ProviderRecord:
hostname: str
ip: str
record_type: str = "A"
metadata: dict[str, Any] = field(default_factory=dict)
@dataclass(frozen=True)
class ProviderCapabilities:
record_types: frozenset[str] = frozenset({"A"})
wildcard_records: bool = False
supports_create: bool = True
supports_update: bool = True
supports_delete: bool = False
max_records: int | None = None