X-Git-Url: http://www.average.org/gitweb/?p=pdns-pipe-nmc.git;a=blobdiff_plain;f=NmcJson.hs;h=651aa46f1be2631fd8245f8ff899544af59546c8;hp=978fb04b67cda0bf2a00776e608eed12c1b844b0;hb=b90215dda1c086c7c288ac9d7e3d75e0516f0fd5;hpb=bae658dcd2084b5f5be71987c6eba23f4106818a diff --git a/NmcJson.hs b/NmcJson.hs index 978fb04..651aa46 100644 --- a/NmcJson.hs +++ b/NmcJson.hs @@ -2,6 +2,7 @@ module NmcJson ( NmcRes(..) , NmcDom + , emptyNmcDom ) where import Data.ByteString.Lazy (ByteString) @@ -28,7 +29,7 @@ instance FromJSON NmcRRService where <*> o .: "host" parseJSON _ = empty -data NmcRRI2p = NmcRRI2p -- unused +data NmcRRI2p = NmcRRI2p { i2pDestination :: String , i2pName :: String , i2pB32 :: String @@ -84,8 +85,12 @@ instance FromJSON NmcDom where <*> o .:? "ds" parseJSON _ = empty +emptyNmcDom = NmcDom Nothing Nothing Nothing Nothing Nothing Nothing + Nothing Nothing Nothing Nothing Nothing Nothing + Nothing Nothing Nothing Nothing Nothing Nothing + data NmcRes = NmcRes { resName :: String - , resValue :: ByteString -- NmcDom + , resValue :: ByteString -- string with NmcDom , resTxid :: String , resAddress :: String , resExpires_in :: Int