DNS.Zone.Manager (DNS v0.4.1)
View SourceZone management system for DNS zones.
Provides CRUD operations for zone management, zone lifecycle operations, and zone coordination across the DNS system.
Summary
Functions
Create a new zone with basic configuration.
Delete a zone.
Get a zone by name.
Initialize the zone management system.
List all zones.
Load a zone from a file.
Load a zone from string content.
Reload a zone from its source file.
Update zone configuration.
Validate zone configuration.
Types
Functions
@spec create_zone(zone_name(), zone_type(), keyword()) :: {:ok, DNS.Zone.t()} | {:error, String.t()}
Create a new zone with basic configuration.
Delete a zone.
@spec get_zone(zone_name()) :: {:ok, DNS.Zone.t()} | {:error, :not_found}
Get a zone by name.
@spec init() :: :ok
Initialize the zone management system.
This function initializes the zone store and clears any existing zones. It is primarily used for testing to ensure a clean state.
@spec list_zones() :: [DNS.Zone.t()]
List all zones.
@spec load_zone_from_file(zone_name(), String.t()) :: {:ok, DNS.Zone.t()} | {:error, String.t()}
Load a zone from a file.
@spec load_zone_from_string(zone_name(), String.t()) :: {:ok, DNS.Zone.t()} | {:error, String.t()}
Load a zone from string content.
@spec reload_zone(zone_name()) :: {:ok, DNS.Zone.t()} | {:error, String.t()}
Reload a zone from its source file.
@spec update_zone( zone_name(), keyword() ) :: {:ok, DNS.Zone.t()} | {:error, String.t()}
Update zone configuration.
@spec validate_zone(DNS.Zone.t()) :: {:ok, DNS.Zone.t()} | {:error, [String.t()]}
Validate zone configuration.