| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Casa.Client
Description
Types and functions for a client for Casa (Content-addressable Storage Archive).
Synopsis
- blobsSource :: forall (m :: Type -> Type) i. (MonadThrow m, MonadResource m, MonadIO m) => SourceConfig -> ConduitT i (BlobKey, ByteString) m ()
- data SourceConfig = SourceConfig {}
- blobsSink :: (MonadIO m, MonadThrow m, MonadUnliftIO m) => CasaRepoPrefix -> ConduitT () ByteString m () -> m ()
- data CasaRepoPrefix
- parseCasaRepoPrefix :: String -> Either String CasaRepoPrefix
- thParserCasaRepo :: String -> Q Exp
- newtype PushException = PushBadHttpStatus Status
- data PullException
Documentation
blobsSource :: forall (m :: Type -> Type) i. (MonadThrow m, MonadResource m, MonadIO m) => SourceConfig -> ConduitT i (BlobKey, ByteString) m () Source #
Make a source of blobs from a URL. Throws PullException.
data SourceConfig Source #
Configuration for sourcing blobs from the server.
Constructors
| SourceConfig | |
Fields
| |
blobsSink :: (MonadIO m, MonadThrow m, MonadUnliftIO m) => CasaRepoPrefix -> ConduitT () ByteString m () -> m () Source #
A sink to push blobs to the server. Throws PushException.
data CasaRepoPrefix Source #
The URL prefix for a Casa repository, commonly https://casa.stackage.org.
Parsers will strip out a trailing slash.
Instances
| FromJSON CasaRepoPrefix Source # | |
Defined in Casa.Client Methods parseJSON :: Value -> Parser CasaRepoPrefix Source # parseJSONList :: Value -> Parser [CasaRepoPrefix] Source # | |
| Show CasaRepoPrefix Source # | |
Defined in Casa.Client | |
| Lift CasaRepoPrefix Source # | |
Defined in Casa.Client Methods lift :: Quote m => CasaRepoPrefix -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => CasaRepoPrefix -> Code m CasaRepoPrefix Source # | |
parseCasaRepoPrefix :: String -> Either String CasaRepoPrefix Source #
Parse and normalize a Casa repo prefix.
newtype PushException Source #
An exception from blob consuming/sending.
Constructors
| PushBadHttpStatus Status |
Instances
| Exception PushException Source # | |
Defined in Casa.Client Methods toException :: PushException -> SomeException Source # fromException :: SomeException -> Maybe PushException Source # displayException :: PushException -> String Source # backtraceDesired :: PushException -> Bool Source # | |
| Show PushException Source # | |
Defined in Casa.Client | |
data PullException Source #
An exception from blob consuming/sending.
Constructors
| AttoParseError ParseError | |
| BadHttpStatus Status | |
| TooManyReturnedKeys Int |
Instances
| Exception PullException Source # | |
Defined in Casa.Client Methods toException :: PullException -> SomeException Source # fromException :: SomeException -> Maybe PullException Source # displayException :: PullException -> String Source # backtraceDesired :: PullException -> Bool Source # | |
| Show PullException Source # | |
Defined in Casa.Client | |