{-# LANGUAGE OverloadedStrings #-}
module PowerDNS.Client
(
applyXApiKey
, listVersions
, Version(..)
, listZones
, createZone
, getZone
, deleteZone
, updateRecords
, updateZone
, triggerAxfr
, notifySlaves
, getZoneAxfr
, rectifyZone
, Zone(..)
, Kind(..)
, RRSets(..)
, RRSet(..)
, Record(..)
, Comment(..)
, ChangeType(..)
, RecordType(..)
, Result(..)
, listCryptoKeys
, createCryptokey
, getCryptokey
, updateCryptokey
, deleteCryptokey
, Cryptokey
, listServers
, getServer
, search
, flushCache
, statistics
, Server(..)
, SearchResult(..)
, ObjectType(..)
, CacheFlushResult(..)
, listMetadata
, createMetadata
, getMetadata
, updateMetadata
, deleteMetadata
, Metadata(..)
, listTSIGKeys
, createTSIGKey
, getTSIGKey
, updateTSIGKey
, deleteTSIGKey
, TSIGKey(..)
, TSIGAlgorithm(..)
, empty
)
where
import qualified Data.CaseInsensitive as CI
import Data.Sequence ((|>))
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Servant.API (NoContent)
import Servant.API.Generic (fromServant)
import Servant.Client (ClientEnv(..), ClientM, client)
import Servant.Client.Core.Request (Request, requestHeaders)
import Servant.Client.Generic (AsClientT)
import PowerDNS.API
import PowerDNS.Internal.Utils (empty)
applyXApiKey :: T.Text
-> ClientEnv
-> ClientEnv
applyXApiKey :: Text -> ClientEnv -> ClientEnv
applyXApiKey Text
key ClientEnv
env = ClientEnv
env { makeClientRequest = modified }
where
modified :: BaseUrl -> Request -> IO Request
modified BaseUrl
url = ClientEnv -> BaseUrl -> Request -> IO Request
makeClientRequest ClientEnv
env BaseUrl
url (Request -> IO Request)
-> (Request -> Request) -> Request -> IO Request
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Request -> Request
applyXApiKeyHeader Text
key
applyXApiKeyHeader :: T.Text -> Request -> Request
Text
key Request
req =
Request
req { requestHeaders = requestHeaders req |> authHeader }
where
authHeader :: Header
authHeader = (ByteString -> CI ByteString
forall s. FoldCase s => s -> CI s
CI.mk ByteString
"X-API-Key", Text -> ByteString
T.encodeUtf8 Text
key)
pdnsClient :: PowerDNS (AsClientT ClientM)
pdnsClient :: PowerDNS (AsClientT ClientM)
pdnsClient = ToServant PowerDNS (AsClientT ClientM)
-> PowerDNS (AsClientT ClientM)
forall (routes :: * -> *) mode.
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (Proxy
((("api" :> (Summary "List versions" :> Get '[JSON] [Version]))
:<|> (("api"
:> ("v1"
:> (((Summary "List servers"
:> ("servers" :> Get '[JSON] [Server]))
:<|> (Summary "Get server"
:> ("servers"
:> (Capture "server_id" Text :> Get '[JSON] Server))))
:<|> ((Summary "Search"
:> ("servers"
:> (Capture "server_id" Text
:> ("search-data"
:> (QueryParamReq "q" Text
:> (QueryParamReq "max" Integer
:> (QueryParam "object_type" ObjectType
:> Get '[JSON] [SearchResult])))))))
:<|> ((Summary "Flush cache"
:> ("servers"
:> (Capture "server_id" Text
:> (QueryParamReq "domain" Text
:> Put '[JSON] CacheFlushResult))))
:<|> (Summary "Statistics"
:> ("servers"
:> (Capture "server_id" Text
:> ("statistics"
:> (QueryParam "statistic" Text
:> (QueryParam "includerings" Bool
:> Get
'[JSON] [AnyStatisticItem])))))))))))
:<|> ("api"
:> ("v1"
:> ((((Summary "List zones"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "zone" Text
:> (QueryParam "dnssec" Bool :> Get '[JSON] [Zone]))))))
:<|> (Summary "Create zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "rrset" Bool
:> (ReqBody '[JSON] Zone
:> PostCreated '[JSON] Zone)))))))
:<|> ((Summary "Get zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (QueryParam "rrsets" Bool
:> Get '[JSON] Zone))))))
:<|> ((Summary "Delete zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text :> DeleteNoContent)))))
:<|> (Summary "Update records"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] RRSets
:> PatchNoContent)))))))))
:<|> (((Summary "Update zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] Zone :> PutNoContent))))))
:<|> (Summary "Trigger AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("axfr-retrieve"
:> Put '[JSON] Result)))))))
:<|> ((Summary "Notify slaves"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("notify" :> Put '[JSON] Result))))))
:<|> ((Summary "Get zone AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("export" :> Get '[JSON] Result))))))
:<|> (Summary "Rectify zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("rectify"
:> Put
'[JSON]
Result))))))))))))))
:<|> (("api"
:> ("v1"
:> (((Summary "List cryptokeys"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys" :> Get '[JSON] [Cryptokey]))))))
:<|> (Summary "Create cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (ReqBody '[JSON] Cryptokey
:> PostCreated '[JSON] Cryptokey))))))))
:<|> ((Summary "Get cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> Get '[JSON] Cryptokey)))))))
:<|> ((Summary "Update cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> (ReqBody '[JSON] Cryptokey
:> PutNoContent))))))))
:<|> (Summary "Delete cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> DeleteNoContent))))))))))))
:<|> (("api"
:> ("v1"
:> (((Summary "List metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata" :> Get '[JSON] [Metadata]))))))
:<|> (Summary "Create metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (ReqBody '[JSON] Metadata
:> PostNoContent))))))))
:<|> ((Summary "Get metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> Get '[JSON] Metadata)))))))
:<|> ((Summary "Update metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> (ReqBody '[JSON] Metadata
:> Put '[JSON] Metadata))))))))
:<|> (Summary "Delete metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> DeleteNoContent))))))))))))
:<|> ("api"
:> ("v1"
:> (((Summary "List TSIG keys"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys" :> Get '[JSON] [TSIGKey]))))
:<|> (Summary "Create TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (ReqBody '[JSON] TSIGKey
:> PostCreated '[JSON] TSIGKey))))))
:<|> ((Summary "Get TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> Get '[JSON] TSIGKey)))))
:<|> ((Summary "Update TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> (ReqBody '[JSON] TSIGKey
:> Put '[JSON] TSIGKey))))))
:<|> (Summary "DElete TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> DeleteNoContent)))))))))))))
-> Client
ClientM
((("api" :> (Summary "List versions" :> Get '[JSON] [Version]))
:<|> (("api"
:> ("v1"
:> (((Summary "List servers"
:> ("servers" :> Get '[JSON] [Server]))
:<|> (Summary "Get server"
:> ("servers"
:> (Capture "server_id" Text :> Get '[JSON] Server))))
:<|> ((Summary "Search"
:> ("servers"
:> (Capture "server_id" Text
:> ("search-data"
:> (QueryParamReq "q" Text
:> (QueryParamReq "max" Integer
:> (QueryParam "object_type" ObjectType
:> Get '[JSON] [SearchResult])))))))
:<|> ((Summary "Flush cache"
:> ("servers"
:> (Capture "server_id" Text
:> (QueryParamReq "domain" Text
:> Put '[JSON] CacheFlushResult))))
:<|> (Summary "Statistics"
:> ("servers"
:> (Capture "server_id" Text
:> ("statistics"
:> (QueryParam "statistic" Text
:> (QueryParam "includerings" Bool
:> Get
'[JSON]
[AnyStatisticItem])))))))))))
:<|> ("api"
:> ("v1"
:> ((((Summary "List zones"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "zone" Text
:> (QueryParam "dnssec" Bool
:> Get '[JSON] [Zone]))))))
:<|> (Summary "Create zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "rrset" Bool
:> (ReqBody '[JSON] Zone
:> PostCreated '[JSON] Zone)))))))
:<|> ((Summary "Get zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (QueryParam "rrsets" Bool
:> Get '[JSON] Zone))))))
:<|> ((Summary "Delete zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> DeleteNoContent)))))
:<|> (Summary "Update records"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] RRSets
:> PatchNoContent)))))))))
:<|> (((Summary "Update zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] Zone :> PutNoContent))))))
:<|> (Summary "Trigger AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("axfr-retrieve"
:> Put '[JSON] Result)))))))
:<|> ((Summary "Notify slaves"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("notify" :> Put '[JSON] Result))))))
:<|> ((Summary "Get zone AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("export"
:> Get '[JSON] Result))))))
:<|> (Summary "Rectify zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("rectify"
:> Put
'[JSON]
Result))))))))))))))
:<|> (("api"
:> ("v1"
:> (((Summary "List cryptokeys"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys" :> Get '[JSON] [Cryptokey]))))))
:<|> (Summary "Create cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (ReqBody '[JSON] Cryptokey
:> PostCreated '[JSON] Cryptokey))))))))
:<|> ((Summary "Get cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> Get '[JSON] Cryptokey)))))))
:<|> ((Summary "Update cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> (ReqBody '[JSON] Cryptokey
:> PutNoContent))))))))
:<|> (Summary "Delete cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> DeleteNoContent))))))))))))
:<|> (("api"
:> ("v1"
:> (((Summary "List metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata" :> Get '[JSON] [Metadata]))))))
:<|> (Summary "Create metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (ReqBody '[JSON] Metadata
:> PostNoContent))))))))
:<|> ((Summary "Get metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> Get '[JSON] Metadata)))))))
:<|> ((Summary "Update metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> (ReqBody '[JSON] Metadata
:> Put '[JSON] Metadata))))))))
:<|> (Summary "Delete metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> DeleteNoContent))))))))))))
:<|> ("api"
:> ("v1"
:> (((Summary "List TSIG keys"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys" :> Get '[JSON] [TSIGKey]))))
:<|> (Summary "Create TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (ReqBody '[JSON] TSIGKey
:> PostCreated '[JSON] TSIGKey))))))
:<|> ((Summary "Get TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> Get '[JSON] TSIGKey)))))
:<|> ((Summary "Update TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> (ReqBody '[JSON] TSIGKey
:> Put '[JSON] TSIGKey))))))
:<|> (Summary "DElete TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> DeleteNoContent)))))))))))))
forall api.
HasClient ClientM api =>
Proxy api -> Client ClientM api
client Proxy
((("api" :> (Summary "List versions" :> Get '[JSON] [Version]))
:<|> (("api"
:> ("v1"
:> (((Summary "List servers"
:> ("servers" :> Get '[JSON] [Server]))
:<|> (Summary "Get server"
:> ("servers"
:> (Capture "server_id" Text :> Get '[JSON] Server))))
:<|> ((Summary "Search"
:> ("servers"
:> (Capture "server_id" Text
:> ("search-data"
:> (QueryParamReq "q" Text
:> (QueryParamReq "max" Integer
:> (QueryParam "object_type" ObjectType
:> Get '[JSON] [SearchResult])))))))
:<|> ((Summary "Flush cache"
:> ("servers"
:> (Capture "server_id" Text
:> (QueryParamReq "domain" Text
:> Put '[JSON] CacheFlushResult))))
:<|> (Summary "Statistics"
:> ("servers"
:> (Capture "server_id" Text
:> ("statistics"
:> (QueryParam "statistic" Text
:> (QueryParam "includerings" Bool
:> Get
'[JSON] [AnyStatisticItem])))))))))))
:<|> ("api"
:> ("v1"
:> ((((Summary "List zones"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "zone" Text
:> (QueryParam "dnssec" Bool :> Get '[JSON] [Zone]))))))
:<|> (Summary "Create zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "rrset" Bool
:> (ReqBody '[JSON] Zone
:> PostCreated '[JSON] Zone)))))))
:<|> ((Summary "Get zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (QueryParam "rrsets" Bool
:> Get '[JSON] Zone))))))
:<|> ((Summary "Delete zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text :> DeleteNoContent)))))
:<|> (Summary "Update records"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] RRSets
:> PatchNoContent)))))))))
:<|> (((Summary "Update zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] Zone :> PutNoContent))))))
:<|> (Summary "Trigger AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("axfr-retrieve"
:> Put '[JSON] Result)))))))
:<|> ((Summary "Notify slaves"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("notify" :> Put '[JSON] Result))))))
:<|> ((Summary "Get zone AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("export" :> Get '[JSON] Result))))))
:<|> (Summary "Rectify zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("rectify"
:> Put
'[JSON]
Result))))))))))))))
:<|> (("api"
:> ("v1"
:> (((Summary "List cryptokeys"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys" :> Get '[JSON] [Cryptokey]))))))
:<|> (Summary "Create cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (ReqBody '[JSON] Cryptokey
:> PostCreated '[JSON] Cryptokey))))))))
:<|> ((Summary "Get cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> Get '[JSON] Cryptokey)))))))
:<|> ((Summary "Update cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> (ReqBody '[JSON] Cryptokey
:> PutNoContent))))))))
:<|> (Summary "Delete cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> DeleteNoContent))))))))))))
:<|> (("api"
:> ("v1"
:> (((Summary "List metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata" :> Get '[JSON] [Metadata]))))))
:<|> (Summary "Create metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (ReqBody '[JSON] Metadata
:> PostNoContent))))))))
:<|> ((Summary "Get metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> Get '[JSON] Metadata)))))))
:<|> ((Summary "Update metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> (ReqBody '[JSON] Metadata
:> Put '[JSON] Metadata))))))))
:<|> (Summary "Delete metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> DeleteNoContent))))))))))))
:<|> ("api"
:> ("v1"
:> (((Summary "List TSIG keys"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys" :> Get '[JSON] [TSIGKey]))))
:<|> (Summary "Create TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (ReqBody '[JSON] TSIGKey
:> PostCreated '[JSON] TSIGKey))))))
:<|> ((Summary "Get TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> Get '[JSON] TSIGKey)))))
:<|> ((Summary "Update TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> (ReqBody '[JSON] TSIGKey
:> Put '[JSON] TSIGKey))))))
:<|> (Summary "DElete TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> DeleteNoContent)))))))))))))
Proxy API
api)
versionsClient :: VersionsAPI (AsClientT ClientM)
versionsClient :: VersionsAPI (AsClientT ClientM)
versionsClient = ToServant VersionsAPI (AsClientT ClientM)
-> VersionsAPI (AsClientT ClientM)
forall (routes :: * -> *) mode.
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (PowerDNS (AsClientT ClientM)
-> AsClientT ClientM :- ("api" :> ToServantApi VersionsAPI)
forall f. PowerDNS f -> f :- ("api" :> ToServantApi VersionsAPI)
versions PowerDNS (AsClientT ClientM)
pdnsClient)
listVersions :: ClientM [Version]
listVersions :: ClientM [Version]
listVersions = VersionsAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "List versions" :> Get '[JSON] [Version])
forall f.
VersionsAPI f
-> f :- (Summary "List versions" :> Get '[JSON] [Version])
apiListVersions VersionsAPI (AsClientT ClientM)
versionsClient
zonesClient :: ZonesAPI (AsClientT ClientM)
zonesClient :: ZonesAPI (AsClientT ClientM)
zonesClient = ToServant ZonesAPI (AsClientT ClientM)
-> ZonesAPI (AsClientT ClientM)
forall (routes :: * -> *) mode.
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (PowerDNS (AsClientT ClientM)
-> AsClientT ClientM :- ("api" :> ("v1" :> ToServantApi ZonesAPI))
forall f.
PowerDNS f -> f :- ("api" :> ("v1" :> ToServantApi ZonesAPI))
zones PowerDNS (AsClientT ClientM)
pdnsClient)
listZones :: T.Text
-> Maybe T.Text
-> Maybe Bool
-> ClientM [Zone]
listZones :: Text -> Maybe Text -> Maybe Bool -> ClientM [Zone]
listZones = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "List zones"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "zone" Text
:> (QueryParam "dnssec" Bool :> Get '[JSON] [Zone]))))))
forall f.
ZonesAPI f
-> f
:- (Summary "List zones"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "zone" Text
:> (QueryParam "dnssec" Bool :> Get '[JSON] [Zone]))))))
apiListZones ZonesAPI (AsClientT ClientM)
zonesClient
createZone :: T.Text
-> Maybe Bool
-> Zone
-> ClientM Zone
createZone :: Text -> Maybe Bool -> Zone -> ClientM Zone
createZone = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Create zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "rrset" Bool
:> (ReqBody '[JSON] Zone :> PostCreated '[JSON] Zone))))))
forall f.
ZonesAPI f
-> f
:- (Summary "Create zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (QueryParam "rrset" Bool
:> (ReqBody '[JSON] Zone :> PostCreated '[JSON] Zone))))))
apiCreateZone ZonesAPI (AsClientT ClientM)
zonesClient
getZone :: T.Text
-> T.Text
-> Maybe Bool
-> ClientM Zone
getZone :: Text -> Text -> Maybe Bool -> ClientM Zone
getZone = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Get zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (QueryParam "rrsets" Bool :> Get '[JSON] Zone))))))
forall f.
ZonesAPI f
-> f
:- (Summary "Get zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (QueryParam "rrsets" Bool :> Get '[JSON] Zone))))))
apiGetZone ZonesAPI (AsClientT ClientM)
zonesClient
deleteZone :: T.Text
-> T.Text
-> ClientM NoContent
deleteZone :: Text -> Text -> ClientM NoContent
deleteZone = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Delete zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones" :> (Capture "zone_id" Text :> DeleteNoContent)))))
forall f.
ZonesAPI f
-> f
:- (Summary "Delete zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones" :> (Capture "zone_id" Text :> DeleteNoContent)))))
apiDeleteZone ZonesAPI (AsClientT ClientM)
zonesClient
updateRecords :: T.Text
-> T.Text
-> RRSets
-> ClientM NoContent
updateRecords :: Text -> Text -> RRSets -> ClientM NoContent
updateRecords = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Update records"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] RRSets :> PatchNoContent))))))
forall f.
ZonesAPI f
-> f
:- (Summary "Update records"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] RRSets :> PatchNoContent))))))
apiUpdateRecords ZonesAPI (AsClientT ClientM)
zonesClient
updateZone :: T.Text
-> T.Text
-> Zone
-> ClientM NoContent
updateZone :: Text -> Text -> Zone -> ClientM NoContent
updateZone = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Update zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] Zone :> PutNoContent))))))
forall f.
ZonesAPI f
-> f
:- (Summary "Update zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> (ReqBody '[JSON] Zone :> PutNoContent))))))
apiUpdateZone ZonesAPI (AsClientT ClientM)
zonesClient
triggerAxfr :: T.Text
-> T.Text
-> ClientM Result
triggerAxfr :: Text -> Text -> ClientM Result
triggerAxfr = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Trigger AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("axfr-retrieve" :> Put '[JSON] Result))))))
forall f.
ZonesAPI f
-> f
:- (Summary "Trigger AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("axfr-retrieve" :> Put '[JSON] Result))))))
apiTriggerAxfr ZonesAPI (AsClientT ClientM)
zonesClient
notifySlaves :: T.Text
-> T.Text
-> ClientM Result
notifySlaves :: Text -> Text -> ClientM Result
notifySlaves = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Notify slaves"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text :> ("notify" :> Put '[JSON] Result))))))
forall f.
ZonesAPI f
-> f
:- (Summary "Notify slaves"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text :> ("notify" :> Put '[JSON] Result))))))
apiNotifySlaves ZonesAPI (AsClientT ClientM)
zonesClient
getZoneAxfr :: T.Text
-> T.Text
-> ClientM Result
getZoneAxfr :: Text -> Text -> ClientM Result
getZoneAxfr = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Get zone AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text :> ("export" :> Get '[JSON] Result))))))
forall f.
ZonesAPI f
-> f
:- (Summary "Get zone AXFR"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text :> ("export" :> Get '[JSON] Result))))))
apiGetZoneAxfr ZonesAPI (AsClientT ClientM)
zonesClient
rectifyZone :: T.Text
-> T.Text
-> ClientM Result
rectifyZone :: Text -> Text -> ClientM Result
rectifyZone = ZonesAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Rectify zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("rectify" :> Put '[JSON] Result))))))
forall f.
ZonesAPI f
-> f
:- (Summary "Rectify zone"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("rectify" :> Put '[JSON] Result))))))
apiRectifyZone ZonesAPI (AsClientT ClientM)
zonesClient
cryptokeysClient :: CryptokeysAPI (AsClientT ClientM)
cryptokeysClient :: CryptokeysAPI (AsClientT ClientM)
cryptokeysClient = ToServant CryptokeysAPI (AsClientT ClientM)
-> CryptokeysAPI (AsClientT ClientM)
forall (routes :: * -> *) mode.
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (PowerDNS (AsClientT ClientM)
-> AsClientT ClientM
:- ("api" :> ("v1" :> ToServantApi CryptokeysAPI))
forall f.
PowerDNS f -> f :- ("api" :> ("v1" :> ToServantApi CryptokeysAPI))
cryptokeys PowerDNS (AsClientT ClientM)
pdnsClient)
listCryptoKeys :: T.Text
-> T.Text
-> ClientM [Cryptokey]
listCryptoKeys :: Text -> Text -> ClientM [Cryptokey]
listCryptoKeys = CryptokeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "List cryptokeys"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys" :> Get '[JSON] [Cryptokey]))))))
forall f.
CryptokeysAPI f
-> f
:- (Summary "List cryptokeys"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys" :> Get '[JSON] [Cryptokey]))))))
apiListCryptokeys CryptokeysAPI (AsClientT ClientM)
cryptokeysClient
createCryptokey :: T.Text
-> T.Text
-> Cryptokey
-> ClientM Cryptokey
createCryptokey :: Text -> Text -> Cryptokey -> ClientM Cryptokey
createCryptokey = CryptokeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Create cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (ReqBody '[JSON] Cryptokey
:> PostCreated '[JSON] Cryptokey)))))))
forall f.
CryptokeysAPI f
-> f
:- (Summary "Create cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (ReqBody '[JSON] Cryptokey
:> PostCreated '[JSON] Cryptokey)))))))
apiCreateCryptokey CryptokeysAPI (AsClientT ClientM)
cryptokeysClient
getCryptokey :: T.Text
-> T.Text
-> T.Text
-> ClientM Cryptokey
getCryptokey :: Text -> Text -> Text -> ClientM Cryptokey
getCryptokey = CryptokeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Get cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text :> Get '[JSON] Cryptokey)))))))
forall f.
CryptokeysAPI f
-> f
:- (Summary "Get cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text :> Get '[JSON] Cryptokey)))))))
apiGetCryptokey CryptokeysAPI (AsClientT ClientM)
cryptokeysClient
updateCryptokey :: T.Text
-> T.Text
-> T.Text
-> Cryptokey
-> ClientM NoContent
updateCryptokey :: Text -> Text -> Text -> Cryptokey -> ClientM NoContent
updateCryptokey = CryptokeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Update cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> (ReqBody '[JSON] Cryptokey :> PutNoContent))))))))
forall f.
CryptokeysAPI f
-> f
:- (Summary "Update cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text
:> (ReqBody '[JSON] Cryptokey :> PutNoContent))))))))
apiUpdateCryptokey CryptokeysAPI (AsClientT ClientM)
cryptokeysClient
deleteCryptokey :: T.Text
-> T.Text
-> T.Text
-> ClientM NoContent
deleteCryptokey :: Text -> Text -> Text -> ClientM NoContent
deleteCryptokey = CryptokeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Delete cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text :> DeleteNoContent)))))))
forall f.
CryptokeysAPI f
-> f
:- (Summary "Delete cryptokey"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("cryptokeys"
:> (Capture "cryptokey_id" Text :> DeleteNoContent)))))))
apiDeleteCryptokey CryptokeysAPI (AsClientT ClientM)
cryptokeysClient
serversClient :: ServersAPI (AsClientT ClientM)
serversClient :: ServersAPI (AsClientT ClientM)
serversClient = ToServant ServersAPI (AsClientT ClientM)
-> ServersAPI (AsClientT ClientM)
forall (routes :: * -> *) mode.
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (PowerDNS (AsClientT ClientM)
-> AsClientT ClientM
:- ("api" :> ("v1" :> ToServantApi ServersAPI))
forall f.
PowerDNS f -> f :- ("api" :> ("v1" :> ToServantApi ServersAPI))
servers PowerDNS (AsClientT ClientM)
pdnsClient)
listServers :: ClientM [Server]
listServers :: ClientM [Server]
listServers = ServersAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "List servers" :> ("servers" :> Get '[JSON] [Server]))
forall f.
ServersAPI f
-> f
:- (Summary "List servers" :> ("servers" :> Get '[JSON] [Server]))
apiListServers ServersAPI (AsClientT ClientM)
serversClient
getServer :: T.Text
-> ClientM Server
getServer :: Text -> ClientM Server
getServer = ServersAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Get server"
:> ("servers" :> (Capture "server_id" Text :> Get '[JSON] Server)))
forall f.
ServersAPI f
-> f
:- (Summary "Get server"
:> ("servers" :> (Capture "server_id" Text :> Get '[JSON] Server)))
apiGetServer ServersAPI (AsClientT ClientM)
serversClient
search :: T.Text
-> T.Text
-> Integer
-> Maybe ObjectType
-> ClientM [SearchResult]
search :: Text
-> Text -> Integer -> Maybe ObjectType -> ClientM [SearchResult]
search = ServersAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Search"
:> ("servers"
:> (Capture "server_id" Text
:> ("search-data"
:> (QueryParamReq "q" Text
:> (QueryParamReq "max" Integer
:> (QueryParam "object_type" ObjectType
:> Get '[JSON] [SearchResult])))))))
forall f.
ServersAPI f
-> f
:- (Summary "Search"
:> ("servers"
:> (Capture "server_id" Text
:> ("search-data"
:> (QueryParamReq "q" Text
:> (QueryParamReq "max" Integer
:> (QueryParam "object_type" ObjectType
:> Get '[JSON] [SearchResult])))))))
apiSearch ServersAPI (AsClientT ClientM)
serversClient
flushCache :: T.Text
-> T.Text
-> ClientM CacheFlushResult
flushCache :: Text -> Text -> ClientM CacheFlushResult
flushCache = ServersAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Flush cache"
:> ("servers"
:> (Capture "server_id" Text
:> (QueryParamReq "domain" Text :> Put '[JSON] CacheFlushResult))))
forall f.
ServersAPI f
-> f
:- (Summary "Flush cache"
:> ("servers"
:> (Capture "server_id" Text
:> (QueryParamReq "domain" Text :> Put '[JSON] CacheFlushResult))))
apiFlushCache ServersAPI (AsClientT ClientM)
serversClient
statistics :: T.Text
-> Maybe T.Text
-> Maybe Bool
-> ClientM [AnyStatisticItem]
statistics :: Text -> Maybe Text -> Maybe Bool -> ClientM [AnyStatisticItem]
statistics = ServersAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Statistics"
:> ("servers"
:> (Capture "server_id" Text
:> ("statistics"
:> (QueryParam "statistic" Text
:> (QueryParam "includerings" Bool
:> Get '[JSON] [AnyStatisticItem]))))))
forall f.
ServersAPI f
-> f
:- (Summary "Statistics"
:> ("servers"
:> (Capture "server_id" Text
:> ("statistics"
:> (QueryParam "statistic" Text
:> (QueryParam "includerings" Bool
:> Get '[JSON] [AnyStatisticItem]))))))
apiStatistics ServersAPI (AsClientT ClientM)
serversClient
metadataClient :: MetadataAPI (AsClientT ClientM)
metadataClient :: MetadataAPI (AsClientT ClientM)
metadataClient = ToServant MetadataAPI (AsClientT ClientM)
-> MetadataAPI (AsClientT ClientM)
forall (routes :: * -> *) mode.
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (PowerDNS (AsClientT ClientM)
-> AsClientT ClientM
:- ("api" :> ("v1" :> ToServantApi MetadataAPI))
forall f.
PowerDNS f -> f :- ("api" :> ("v1" :> ToServantApi MetadataAPI))
metadata PowerDNS (AsClientT ClientM)
pdnsClient)
listMetadata :: T.Text
-> T.Text
-> ClientM [Metadata]
listMetadata :: Text -> Text -> ClientM [Metadata]
listMetadata = MetadataAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "List metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata" :> Get '[JSON] [Metadata]))))))
forall f.
MetadataAPI f
-> f
:- (Summary "List metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata" :> Get '[JSON] [Metadata]))))))
apiListMetadata MetadataAPI (AsClientT ClientM)
metadataClient
createMetadata :: T.Text
-> T.Text
-> Metadata
-> ClientM NoContent
createMetadata :: Text -> Text -> Metadata -> ClientM NoContent
createMetadata = MetadataAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Create metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata" :> (ReqBody '[JSON] Metadata :> PostNoContent)))))))
forall f.
MetadataAPI f
-> f
:- (Summary "Create metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata" :> (ReqBody '[JSON] Metadata :> PostNoContent)))))))
apiCreateMetadata MetadataAPI (AsClientT ClientM)
metadataClient
getMetadata :: T.Text
-> T.Text
-> T.Text
-> ClientM Metadata
getMetadata :: Text -> Text -> Text -> ClientM Metadata
getMetadata = MetadataAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Get metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text :> Get '[JSON] Metadata)))))))
forall f.
MetadataAPI f
-> f
:- (Summary "Get metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text :> Get '[JSON] Metadata)))))))
apiGetMetadata MetadataAPI (AsClientT ClientM)
metadataClient
updateMetadata :: T.Text
-> T.Text
-> T.Text
-> Metadata
-> ClientM Metadata
updateMetadata :: Text -> Text -> Text -> Metadata -> ClientM Metadata
updateMetadata = MetadataAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Update metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> (ReqBody '[JSON] Metadata :> Put '[JSON] Metadata))))))))
forall f.
MetadataAPI f
-> f
:- (Summary "Update metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata"
:> (Capture "kind" Text
:> (ReqBody '[JSON] Metadata :> Put '[JSON] Metadata))))))))
apiUpdateMetadata MetadataAPI (AsClientT ClientM)
metadataClient
deleteMetadata :: T.Text
-> T.Text
-> T.Text
-> ClientM NoContent
deleteMetadata :: Text -> Text -> Text -> ClientM NoContent
deleteMetadata = MetadataAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Delete metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata" :> (Capture "kind" Text :> DeleteNoContent)))))))
forall f.
MetadataAPI f
-> f
:- (Summary "Delete metadata"
:> ("servers"
:> (Capture "server_id" Text
:> ("zones"
:> (Capture "zone_id" Text
:> ("metadata" :> (Capture "kind" Text :> DeleteNoContent)))))))
apiDeleteMetadata MetadataAPI (AsClientT ClientM)
metadataClient
tsigkeysClient :: TSIGKeysAPI (AsClientT ClientM)
tsigkeysClient :: TSIGKeysAPI (AsClientT ClientM)
tsigkeysClient = ToServant TSIGKeysAPI (AsClientT ClientM)
-> TSIGKeysAPI (AsClientT ClientM)
forall (routes :: * -> *) mode.
GenericServant routes mode =>
ToServant routes mode -> routes mode
fromServant (PowerDNS (AsClientT ClientM)
-> AsClientT ClientM
:- ("api" :> ("v1" :> ToServantApi TSIGKeysAPI))
forall f.
PowerDNS f -> f :- ("api" :> ("v1" :> ToServantApi TSIGKeysAPI))
tsigkeys PowerDNS (AsClientT ClientM)
pdnsClient)
listTSIGKeys :: T.Text -> ClientM [TSIGKey]
listTSIGKeys :: Text -> ClientM [TSIGKey]
listTSIGKeys = TSIGKeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "List TSIG keys"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys" :> Get '[JSON] [TSIGKey]))))
forall f.
TSIGKeysAPI f
-> f
:- (Summary "List TSIG keys"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys" :> Get '[JSON] [TSIGKey]))))
apiListTSIGKeys TSIGKeysAPI (AsClientT ClientM)
tsigkeysClient
createTSIGKey :: T.Text -> TSIGKey -> ClientM TSIGKey
createTSIGKey :: Text -> TSIGKey -> ClientM TSIGKey
createTSIGKey = TSIGKeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Create TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (ReqBody '[JSON] TSIGKey :> PostCreated '[JSON] TSIGKey)))))
forall f.
TSIGKeysAPI f
-> f
:- (Summary "Create TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (ReqBody '[JSON] TSIGKey :> PostCreated '[JSON] TSIGKey)))))
apiCreateTSIGKey TSIGKeysAPI (AsClientT ClientM)
tsigkeysClient
getTSIGKey :: T.Text -> T.Text -> ClientM TSIGKey
getTSIGKey :: Text -> Text -> ClientM TSIGKey
getTSIGKey = TSIGKeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Get TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text :> Get '[JSON] TSIGKey)))))
forall f.
TSIGKeysAPI f
-> f
:- (Summary "Get TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text :> Get '[JSON] TSIGKey)))))
apiGetTSIGKey TSIGKeysAPI (AsClientT ClientM)
tsigkeysClient
updateTSIGKey :: T.Text -> T.Text -> TSIGKey -> ClientM TSIGKey
updateTSIGKey :: Text -> Text -> TSIGKey -> ClientM TSIGKey
updateTSIGKey = TSIGKeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "Update TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> (ReqBody '[JSON] TSIGKey :> Put '[JSON] TSIGKey))))))
forall f.
TSIGKeysAPI f
-> f
:- (Summary "Update TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text
:> (ReqBody '[JSON] TSIGKey :> Put '[JSON] TSIGKey))))))
apiUpdateTSIGKey TSIGKeysAPI (AsClientT ClientM)
tsigkeysClient
deleteTSIGKey :: T.Text -> T.Text -> ClientM NoContent
deleteTSIGKey :: Text -> Text -> ClientM NoContent
deleteTSIGKey = TSIGKeysAPI (AsClientT ClientM)
-> AsClientT ClientM
:- (Summary "DElete TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text :> DeleteNoContent)))))
forall f.
TSIGKeysAPI f
-> f
:- (Summary "DElete TSIG key"
:> ("servers"
:> (Capture "server_id" Text
:> ("tsigkeys"
:> (Capture "tsigkey_id" Text :> DeleteNoContent)))))
apiDeleteTSIGKey TSIGKeysAPI (AsClientT ClientM)
tsigkeysClient