Copyright | (c) Connor Moreside 2016 |
---|---|
License | BSD-3 |
Maintainer | connor@moresi.de |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
- data LoginMethod
- data LightningOptions = LightningOptions {}
- data LightningState = LightningState {}
- runLightning :: MonadIO m => LightningT m a -> m (Either (APIError LightningError) a)
- runLightningWith :: MonadIO m => LightningOptions -> LightningT m a -> m (Either (APIError LightningError) a)
- runResumeLightningtWith :: MonadIO m => LightningOptions -> LightningT m a -> m (Either (APIError LightningError, Maybe (LightningT m a)) a)
- interpretIO :: MonadIO m => LightningState -> LightningT m a -> m (Either (APIError LightningError, Maybe (LightningT m a)) a)
- defaultLightningOptions :: LightningOptions
- setBaseURL :: Text -> LightningOptions -> LightningOptions
- setSessionName :: Text -> LightningOptions -> LightningOptions
- setSessionId :: Text -> LightningOptions -> LightningOptions
- setBasicAuth :: Credentials -> LightningOptions -> LightningOptions
- data APIError a :: * -> *
- module Web.Lightning.Types.Error
- module Web.Lightning.Types.Lightning
Lightning Types
data LoginMethod Source #
Represents the different authentication mechanisms available in the lightning-viz server.
data LightningOptions Source #
Defines the available options for running a lightning action(s).
LightningOptions | |
|
data LightningState Source #
Stores the current state of the lightning transformer stack.
LightningState | |
|
Execute
runLightning :: MonadIO m => LightningT m a -> m (Either (APIError LightningError) a) Source #
Performs a lightning action (or LightningT
transformer actions) with the
default lightning options. By default, the lightning-viz server is assumed to
be running on http://localhost:3000 and a new session will be created.
runLightningWith :: MonadIO m => LightningOptions -> LightningT m a -> m (Either (APIError LightningError) a) Source #
Performs a lightning action (or LightningT
transformer actions) with
the specified lightning options.
runResumeLightningtWith :: MonadIO m => LightningOptions -> LightningT m a -> m (Either (APIError LightningError, Maybe (LightningT m a)) a) Source #
Runs a lightning action using the specified options.
interpretIO :: MonadIO m => LightningState -> LightningT m a -> m (Either (APIError LightningError, Maybe (LightningT m a)) a) Source #
Runs a specified series of lightning actions.
Client configuration
defaultLightningOptions :: LightningOptions Source #
Defines the default lightning-viz options.
:: Text | Fully qualified API base URL |
-> LightningOptions | |
-> LightningOptions |
Sets the base URL of Lightning's API in the given
LightningOptions
record.
:: Text | The new session name |
-> LightningOptions | |
-> LightningOptions |
Sets the name of the session that is nested in the
given LightningOptions
record.
:: Text | The new session ID |
-> LightningOptions | |
-> LightningOptions |
Sets the session ID of the session nested in the given
LightningOptions
record.
setBasicAuth :: Credentials -> LightningOptions -> LightningOptions Source #
Sets BasicAuth
with Credentials
as the login method in the
given LightningOptions
record.
Re-exports
Error type for the API
, where a
is the type that should be returned when
something goes wrong on the other end - i.e. any error that isn't directly related
to this library.
APIError a | A type that represents any error that happens on the API end.
Define your own custom type with a |
HTTPError HttpException | Something went wrong when we tried to do a HTTP operation. |
InvalidURLError | You're trying to create an invalid URL somewhere - check your
|
ParseError String | Failed when parsing the response, and it wasn't an error on their end. |
EmptyError | Empty error to serve as a zero element for Monoid. |
module Web.Lightning.Types.Error