Safe Haskell | None |
---|---|
Language | Haskell98 |
Propellor.Types.Dns
- type Domain = String
- data IPAddr
- newtype AliasesInfo = AliasesInfo (Set HostName)
- toAliasesInfo :: [HostName] -> AliasesInfo
- fromAliasesInfo :: AliasesInfo -> [HostName]
- newtype DnsInfoPropagated = DnsInfoPropagated {
- fromDnsInfoPropagated :: Set Record
- toDnsInfoPropagated :: Set Record -> DnsInfoPropagated
- newtype DnsInfoUnpropagated = DnsInfoUnpropagated {
- fromDnsInfoUnpropagated :: Set Record
- toDnsInfoUnpropagated :: Set Record -> DnsInfoUnpropagated
- getDnsInfo :: Info -> Set Record
- data NamedConf = NamedConf {
- confDomain :: Domain
- confDnsServerType :: DnsServerType
- confFile :: FilePath
- confMasters :: [IPAddr]
- confAllowTransfer :: [IPAddr]
- confLines :: [String]
- data DnsServerType
- data Zone = Zone {}
- data SOA = SOA {
- sDomain :: BindDomain
- sSerial :: SerialNumber
- sRefresh :: Integer
- sRetry :: Integer
- sExpire :: Integer
- sNegativeCacheTTL :: Integer
- data Record
- = Address IPAddr
- | CNAME BindDomain
- | MX Int BindDomain
- | NS BindDomain
- | TXT String
- | SRV Word16 Word16 Word16 BindDomain
- | SSHFP Int Int String
- | INCLUDE FilePath
- | PTR ReverseIP
- type ReverseIP = String
- reverseIP :: IPAddr -> ReverseIP
- canonicalIP :: IPAddr -> IPAddr
- getIPAddr :: Record -> Maybe IPAddr
- getCNAME :: Record -> Maybe BindDomain
- getNS :: Record -> Maybe BindDomain
- type SerialNumber = Word32
- data BindDomain
- domainHostName :: BindDomain -> Maybe HostName
- newtype NamedConfMap = NamedConfMap (Map Domain NamedConf)
- fromNamedConfMap :: NamedConfMap -> Map Domain NamedConf
Documentation
newtype AliasesInfo Source #
Constructors
AliasesInfo (Set HostName) |
Instances
Eq AliasesInfo Source # | |
Ord AliasesInfo Source # | |
Show AliasesInfo Source # | |
Semigroup AliasesInfo Source # | |
Monoid AliasesInfo Source # | |
IsInfo AliasesInfo Source # | |
toAliasesInfo :: [HostName] -> AliasesInfo Source #
fromAliasesInfo :: AliasesInfo -> [HostName] Source #
newtype DnsInfoPropagated Source #
Use this for DNS Info that should propagate from a container to a host. For example, this can be used for CNAME to make aliases of the containers in the host be reflected in the DNS.
Constructors
DnsInfoPropagated | |
Fields
|
Instances
Eq DnsInfoPropagated Source # | |
Ord DnsInfoPropagated Source # | |
Show DnsInfoPropagated Source # | |
Semigroup DnsInfoPropagated Source # | |
Monoid DnsInfoPropagated Source # | |
IsInfo DnsInfoPropagated Source # | |
toDnsInfoPropagated :: Set Record -> DnsInfoPropagated Source #
newtype DnsInfoUnpropagated Source #
Use this for DNS Info that should not propagate from a container to a host. For example, an IP address of a container should not influence the host.
Constructors
DnsInfoUnpropagated | |
Fields
|
Instances
Eq DnsInfoUnpropagated Source # | |
Ord DnsInfoUnpropagated Source # | |
Show DnsInfoUnpropagated Source # | |
Semigroup DnsInfoUnpropagated Source # | |
Monoid DnsInfoUnpropagated Source # | |
IsInfo DnsInfoUnpropagated Source # | |
toDnsInfoUnpropagated :: Set Record -> DnsInfoUnpropagated Source #
getDnsInfo :: Info -> Set Record Source #
Get all DNS Info.
Represents a bind 9 named.conf file.
Constructors
NamedConf | |
Fields
|
data DnsServerType Source #
Instances
Eq DnsServerType Source # | |
Ord DnsServerType Source # | |
Show DnsServerType Source # | |
Represents a bind 9 zone file.
Every domain has a SOA record, which is big and complicated.
Constructors
SOA | |
Fields
|
Types of DNS records.
This is not a complete list, more can be added.
Constructors
Address IPAddr | |
CNAME BindDomain | |
MX Int BindDomain | |
NS BindDomain | |
TXT String | |
SRV Word16 Word16 Word16 BindDomain | |
SSHFP Int Int String | |
INCLUDE FilePath | |
PTR ReverseIP |
canonicalIP :: IPAddr -> IPAddr Source #
Converts an IP address (particularly IPv6) to canonical, fully expanded form.
getCNAME :: Record -> Maybe BindDomain Source #
getNS :: Record -> Maybe BindDomain Source #
type SerialNumber = Word32 Source #
Bind serial numbers are unsigned, 32 bit integers.
data BindDomain Source #
Domains in the zone file must end with a period if they are absolute.
Let's use a type to keep absolute domains straight from relative domains.
The RootDomain refers to the top level of the domain, so can be used to add nameservers, MX's, etc to a domain.
Constructors
RelDomain Domain | |
AbsDomain Domain | |
RootDomain |
Instances
Eq BindDomain Source # | |
Ord BindDomain Source # | |
Read BindDomain Source # | |
Show BindDomain Source # | |
domainHostName :: BindDomain -> Maybe HostName Source #
newtype NamedConfMap Source #
Constructors
NamedConfMap (Map Domain NamedConf) |
Instances
Eq NamedConfMap Source # | |
Ord NamedConfMap Source # | |
Show NamedConfMap Source # | |
Semigroup NamedConfMap Source # | Adding a Master NamedConf stanza for a particulr domain always overrides an existing Secondary stanza for that domain, while a Secondary stanza is only added when there is no existing Master stanza. |
Monoid NamedConfMap Source # | |
Empty NamedConfMap Source # | |
IsInfo NamedConfMap Source # | |
fromNamedConfMap :: NamedConfMap -> Map Domain NamedConf Source #