Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- determineDefaultApiBaseUrl :: IO Text
- init :: IO HerculesClientEnv
- newtype HerculesClientToken = HerculesClientToken Token
- data HerculesClientEnv
- retryOnFail :: (NFData b, Has HerculesClientToken r, Has HerculesClientEnv r) => Text -> (Token -> ClientM b) -> RIO r b
- retryOnFailAnon :: (NFData b, Has HerculesClientEnv r) => Text -> ClientM b -> RIO r b
- retryStreamOnFail :: (Has HerculesClientToken r, Has HerculesClientEnv r) => Text -> (Token -> ClientM b) -> (Either ClientError b -> IO c) -> RIO r c
- shouldRetryClientError :: ClientError -> Bool
- clientErrorSummary :: ClientError -> Text
- shouldRetryResponse :: Either ClientError r -> Bool
- waitRetryPolicy :: MonadIO m => RetryPolicyM m
- dieWithHttpError :: ClientError -> IO a
- prettyPrintHttpErrors :: IO a -> IO a
- accountsClient :: AccountsAPI ClientAuth (AsClientT ClientM)
- projectsClient :: ProjectsAPI ClientAuth (AsClientT ClientM)
- reposClient :: ReposAPI ClientAuth (AsClientT ClientM)
- stateClient :: StateAPI ClientAuth (AsClientT ClientM)
Setup
Using the client
data HerculesClientEnv Source #
retryOnFail :: (NFData b, Has HerculesClientToken r, Has HerculesClientEnv r) => Text -> (Token -> ClientM b) -> RIO r b Source #
retryOnFailAnon :: (NFData b, Has HerculesClientEnv r) => Text -> ClientM b -> RIO r b Source #
retryStreamOnFail :: (Has HerculesClientToken r, Has HerculesClientEnv r) => Text -> (Token -> ClientM b) -> (Either ClientError b -> IO c) -> RIO r c Source #
Error handling
clientErrorSummary :: ClientError -> Text Source #
ClientError printer that won't leak sensitive info.
shouldRetryResponse :: Either ClientError r -> Bool Source #
waitRetryPolicy :: MonadIO m => RetryPolicyM m Source #
dieWithHttpError :: ClientError -> IO a Source #
prettyPrintHttpErrors :: IO a -> IO a Source #
Client function groups
accountsClient :: AccountsAPI ClientAuth (AsClientT ClientM) Source #
projectsClient :: ProjectsAPI ClientAuth (AsClientT ClientM) Source #
reposClient :: ReposAPI ClientAuth (AsClientT ClientM) Source #
stateClient :: StateAPI ClientAuth (AsClientT ClientM) Source #