Minor DNSManager API change.

beta
Philippe Pittoli 2023-06-27 13:11:59 +02:00
parent b20504dfb9
commit ad7ee31806
1 changed files with 9 additions and 9 deletions

View File

@ -45,15 +45,15 @@ codecNewDomain ∷ CA.JsonCodec NewDomain
codecNewDomain = CA.object "NewDomain" (CAR.record { domain: CA.string })
{- 10 -}
type DeleteDomain = { domain :: String }
codecDeleteDomain ∷ CA.JsonCodec DeleteDomain
codecDeleteDomain = CA.object "DeleteDomain" (CAR.record { domain: CA.string })
{- 11 -}
type AddOrUpdateZone = { zone :: DNSZone.DNSZone }
codecAddOrUpdateZone ∷ CA.JsonCodec AddOrUpdateZone
codecAddOrUpdateZone = CA.object "AddOrUpdateZone" (CAR.record { zone: DNSZone.codec })
{- 11 -}
type DeleteZone = { domain :: String }
codecDeleteZone ∷ CA.JsonCodec DeleteZone
codecDeleteZone = CA.object "DeleteZone" (CAR.record { domain: CA.string })
{- 12 -}
type GetZone = { domain :: String }
codecGetZone ∷ CA.JsonCodec GetZone
@ -153,8 +153,8 @@ data RequestMessage
= MkLogin Login -- 0
| MkMaintenance Maintenance -- 7
| MkNewDomain NewDomain -- 9
| MkAddOrUpdateZone AddOrUpdateZone -- 10
| MkDeleteZone DeleteZone -- 11
| MkDeleteDomain DeleteDomain -- 10
| MkAddOrUpdateZone AddOrUpdateZone -- 11
| MkGetZone GetZone -- 12
| MkUserDomains UserDomains -- 13
| MkAddRR AddRR -- 14
@ -182,8 +182,8 @@ encode m = case m of
(MkLogin request) -> get_tuple 0 codecLogin request
(MkMaintenance request) -> get_tuple 7 codecMaintenance request
(MkNewDomain request) -> get_tuple 9 codecNewDomain request
(MkAddOrUpdateZone request) -> get_tuple 10 codecAddOrUpdateZone request
(MkDeleteZone request) -> get_tuple 11 codecDeleteZone request
(MkDeleteDomain request) -> get_tuple 10 codecDeleteDomain request
(MkAddOrUpdateZone request) -> get_tuple 11 codecAddOrUpdateZone request
(MkGetZone request) -> get_tuple 12 codecGetZone request
(MkUserDomains request) -> get_tuple 13 codecUserDomains request
(MkAddRR request) -> get_tuple 14 codecAddRR request