module Network.Ipfs.Api.Bootstrap where
import Control.Monad.IO.Class (MonadIO)
import Data.Text (Text)
import Network.Ipfs.Api.Internal (_bootstrapAdd, _bootstrapList,
_bootstrapRM)
import Network.Ipfs.Api.Internal.Call (call)
import Network.Ipfs.Api.Types (BootstrapObj)
import Network.Ipfs.Client (IpfsT)
add :: MonadIO m => Text -> IpfsT m BootstrapObj
add :: Text -> IpfsT m BootstrapObj
add = ClientM BootstrapObj -> IpfsT m BootstrapObj
forall (m :: * -> *) a. MonadIO m => ClientM a -> IpfsT m a
call (ClientM BootstrapObj -> IpfsT m BootstrapObj)
-> (Text -> ClientM BootstrapObj) -> Text -> IpfsT m BootstrapObj
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe Text -> ClientM BootstrapObj
_bootstrapAdd (Maybe Text -> ClientM BootstrapObj)
-> (Text -> Maybe Text) -> Text -> ClientM BootstrapObj
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Maybe Text
forall a. a -> Maybe a
Just
list :: MonadIO m => IpfsT m BootstrapObj
list :: IpfsT m BootstrapObj
list = ClientM BootstrapObj -> IpfsT m BootstrapObj
forall (m :: * -> *) a. MonadIO m => ClientM a -> IpfsT m a
call ClientM BootstrapObj
_bootstrapList
rm :: MonadIO m => Text -> IpfsT m BootstrapObj
rm :: Text -> IpfsT m BootstrapObj
rm = ClientM BootstrapObj -> IpfsT m BootstrapObj
forall (m :: * -> *) a. MonadIO m => ClientM a -> IpfsT m a
call (ClientM BootstrapObj -> IpfsT m BootstrapObj)
-> (Text -> ClientM BootstrapObj) -> Text -> IpfsT m BootstrapObj
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe Text -> ClientM BootstrapObj
_bootstrapRM (Maybe Text -> ClientM BootstrapObj)
-> (Text -> Maybe Text) -> Text -> ClientM BootstrapObj
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Maybe Text
forall a. a -> Maybe a
Just