-- |
-- Module      :  Network.Ipfs.Api.Internal.Stream
-- Copyright   :  Aleksandr Krupenkin 2016-2021
-- License     :  Apache-2.0
--
-- Maintainer  :  mail@akru.me
-- Stability   :  experimental
-- Portability :  portable
--
-- Ipfs Stream API provider.
--

module Network.Ipfs.Api.Internal.Stream where

import qualified Data.ByteString.Lazy.Char8    ()
import           Data.Proxy
import           Data.Text
import           Network.HTTP.Client           ()
import           Servant.API
import           Servant.Client.Streaming      as S

import           Network.Ipfs.Api.Types.Stream

_ipfsStreamApi :: Proxy IpfsStreamApi
_ipfsStreamApi :: Proxy IpfsStreamApi
_ipfsStreamApi =  Proxy IpfsStreamApi
forall k (t :: k). Proxy t
Proxy

_ping :: Text -> ClientM (SourceIO PingObj)
_dhtFindPeer :: Text -> ClientM (SourceIO DhtObj)
_dhtFindProvs :: Text -> ClientM (SourceIO DhtObj)
_dhtGet :: Text -> ClientM (SourceIO DhtObj)
_dhtProvide :: Text -> ClientM (SourceIO DhtObj)
_dhtQuery :: Text -> ClientM (SourceIO DhtObj)
_logTail :: ClientM (SourceIO LogReturnType)
_repoGc :: ClientM (SourceIO RepoGcObj)
_repoVerify :: ClientM (SourceIO RepoVerifyObj)
_refs :: Text -> ClientM (SourceIO RefsObj)
_refsLocal :: ClientM (SourceIO RefsObj)
_pubsubSubscribe :: Text -> ClientM (SourceIO PubsubSubObj)

Text -> ClientM (SourceIO PingObj)
_ping :<|> Text -> ClientM (SourceIO DhtObj)
_dhtFindPeer :<|> Text -> ClientM (SourceIO DhtObj)
_dhtFindProvs :<|> Text -> ClientM (SourceIO DhtObj)
_dhtGet :<|> Text -> ClientM (SourceIO DhtObj)
_dhtProvide :<|> Text -> ClientM (SourceIO DhtObj)
_dhtQuery :<|>
  ClientM (SourceIO Text)
_logTail :<|> ClientM (SourceIO RepoGcObj)
_repoGc :<|> ClientM (SourceIO RepoVerifyObj)
_repoVerify :<|> Text -> ClientM (SourceIO RefsObj)
_refs :<|> ClientM (SourceIO RefsObj)
_refsLocal :<|> Text -> ClientM (SourceIO PubsubSubObj)
_pubsubSubscribe = Proxy IpfsStreamApi -> Client ClientM IpfsStreamApi
forall api.
HasClient ClientM api =>
Proxy api -> Client ClientM api
client Proxy IpfsStreamApi
_ipfsStreamApi