X-Git-Url: http://average.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=NmcJson.hs;h=e69f4f4655a36b221644bf972e391f85c76a37c1;hb=8c8cc995d35f462dbfdb7279f7e6da9bf27b670b;hp=978fb04b67cda0bf2a00776e608eed12c1b844b0;hpb=26b23d266b588ea4b5bc4d53cbf479f9b40d26a0;p=pdns-pipe-nmc.git diff --git a/NmcJson.hs b/NmcJson.hs index 978fb04..e69f4f4 100644 --- a/NmcJson.hs +++ b/NmcJson.hs @@ -1,7 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} module NmcJson ( NmcRes(..) - , NmcDom + , 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