, domDs :: Maybe [NmcRRDs]
, domMx :: Maybe [String] -- Synthetic
, domSrv :: Maybe [String] -- Synthetic
+ , domTlsa :: Maybe [String] -- Synthetic
} deriving (Show, Eq)
instance Default NmcDom where
def = NmcDom Nothing Nothing Nothing Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing Nothing Nothing
- Nothing Nothing Nothing Nothing Nothing Nothing
+ Nothing Nothing Nothing Nothing Nothing Nothing Nothing
instance FromJSON NmcDom where
-- Wherever we expect a domain object, there may be a string
<*> o .:? "ds"
<*> return Nothing -- domMx not parsed
<*> return Nothing -- domSrv not parsed
+ <*> return Nothing -- domTlsa not parsed
parseJSON _ = empty
instance Mergeable NmcDom where
, domDs = mergelm domDs
, domMx = mergelm domMx
, domSrv = mergelm domSrv
+ , domTlsa = mergelm domTlsa
}
where
mergelm x = merge (x sub) (x dom)
data RRType = RRTypeSRV | RRTypeA | RRTypeAAAA | RRTypeCNAME
| RRTypeDNAME | RRTypeSOA | RRTypeRP | RRTypeLOC
- | RRTypeNS | RRTypeDS | RRTypeMX
+ | RRTypeNS | RRTypeDS | RRTypeMX | RRTypeTLSA
| RRTypeANY | RRTypeError String
instance Show RRType where
show RRTypeNS = "NS"
show RRTypeDS = "DS"
show RRTypeMX = "MX"
+ show RRTypeTLSA = "TLSA"
show RRTypeANY = "ANY"
show (RRTypeError s) = "Unknown RR type: " ++ (show s)
"NS" -> RRTypeNS
"DS" -> RRTypeDS
"MX" -> RRTypeMX
+ "TLSA" -> RRTypeTLSA
"ANY" -> RRTypeANY
_ -> RRTypeError qt
dataRR RRTypeSRV = justl domSrv
dataRR RRTypeMX = justl domMx
+dataRR RRTypeTLSA = justl domTlsa
dataRR RRTypeA = justl domIp
dataRR RRTypeAAAA = justl domIp6
dataRR RRTypeCNAME = justv domAlias
-{"ip":"9.8.7.6"}
+{"ip":"9.8.7.6","tls":{"tcp":{"443":[[1,"660008F9",0]],"25":[[1,"7621B787",1]]}}}