summaryrefslogtreecommitdiff
path: root/Propellor/Types/Dns.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Propellor/Types/Dns.hs')
-rw-r--r--Propellor/Types/Dns.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Propellor/Types/Dns.hs b/Propellor/Types/Dns.hs
index b5cfcffd..0474ea96 100644
--- a/Propellor/Types/Dns.hs
+++ b/Propellor/Types/Dns.hs
@@ -1,7 +1,5 @@
module Propellor.Types.Dns where
-import Propellor.Types.OS (HostName)
-
import Data.Word
type Domain = String
@@ -28,8 +26,9 @@ data Type = Master | Secondary
-- | Represents a bind 9 zone file.
data Zone = Zone
- { zSOA :: SOA
- , zHosts :: [(HostName, Record)]
+ { zDomain :: Domain
+ , zSOA :: SOA
+ , zHosts :: [(BindDomain, Record)]
}
deriving (Read, Show, Eq)
@@ -64,6 +63,10 @@ getIPAddr :: Record -> Maybe IPAddr
getIPAddr (Address addr) = Just addr
getIPAddr _ = Nothing
+getCNAME :: Record -> Maybe BindDomain
+getCNAME (CNAME d) = Just d
+getCNAME _ = Nothing
+
-- | Bind serial numbers are unsigned, 32 bit integers.
type SerialNumber = Word32