29 lines
678 B
Python
29 lines
678 B
Python
import logging
|
|
|
|
from ..config import Config
|
|
|
|
|
|
class Handler:
|
|
zone: str
|
|
config: Config
|
|
token: str
|
|
nameservers: list[str]
|
|
|
|
def __init__(self, zone: str, config: Config, token: str) -> None:
|
|
self.log = logging.getLogger('nyacme_hook.' + type(self).__name__)
|
|
self.zone = zone
|
|
self.config = config
|
|
self.token = token
|
|
|
|
def create(self, record_name: str, record_value: str) -> None:
|
|
'''
|
|
Create a record with a given name and value.
|
|
'''
|
|
pass
|
|
|
|
def remove(self, record_name: str) -> None:
|
|
'''
|
|
Remove a record, or do nothing in case record does not exist.
|
|
'''
|
|
pass
|