Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type RunCallback context = LambdaOptions context -> IO (Either LambdaError LambdaResult)
- data LambdaResult
- = StandaloneLambdaResult LambdaResponseBody
- | ApiGatewayResult (ApiGatewayResponse ApiGatewayResponseBody)
- data LambdaError
- = StandaloneLambdaError LambdaResponseBody
- | ApiGatewayLambdaError (ApiGatewayResponse ApiGatewayResponseBody)
- data LambdaOptions context = LambdaOptions {
- eventObject :: !ByteString
- functionHandler :: !String
- executionUuid :: !String
- contextObject :: !(Context context)
- newtype DispatcherOptions = DispatcherOptions {}
- newtype ApiGatewayDispatcherOptions = ApiGatewayDispatcherOptions {}
- data DispatcherStrategy
- class ToLambdaResponseBody a where
- toStandaloneLambdaResponse :: a -> LambdaResponseBody
- unLambdaResponseBody :: LambdaResponseBody -> Text
- defaultDispatcherOptions :: DispatcherOptions
Documentation
type RunCallback context = LambdaOptions context -> IO (Either LambdaError LambdaResult) Source #
Callback that we pass to the dispatcher function
data LambdaResult Source #
Wrapper type to handle the result of the user
StandaloneLambdaResult LambdaResponseBody | |
ApiGatewayResult (ApiGatewayResponse ApiGatewayResponseBody) |
data LambdaError Source #
Wrapper type for lambda execution results
StandaloneLambdaError LambdaResponseBody | |
ApiGatewayLambdaError (ApiGatewayResponse ApiGatewayResponseBody) |
data LambdaOptions context Source #
Options that the generated main expects
LambdaOptions | |
|
Instances
Generic (LambdaOptions context) Source # | |
Defined in Aws.Lambda.Runtime.Common type Rep (LambdaOptions context) :: Type -> Type # from :: LambdaOptions context -> Rep (LambdaOptions context) x # to :: Rep (LambdaOptions context) x -> LambdaOptions context # | |
type Rep (LambdaOptions context) Source # | |
Defined in Aws.Lambda.Runtime.Common type Rep (LambdaOptions context) = D1 (MetaData "LambdaOptions" "Aws.Lambda.Runtime.Common" "aws-lambda-haskell-runtime-3.0.5-I9jlBCbDHnX14k3f9BIAMN" False) (C1 (MetaCons "LambdaOptions" PrefixI True) ((S1 (MetaSel (Just "eventObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ByteString) :*: S1 (MetaSel (Just "functionHandler") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 String)) :*: (S1 (MetaSel (Just "executionUuid") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 String) :*: S1 (MetaSel (Just "contextObject") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Context context))))) |
newtype DispatcherOptions Source #
Options that the dispatcher generator expects
Instances
Lift DispatcherOptions Source # | |
Defined in Aws.Lambda.Runtime.Common lift :: DispatcherOptions -> Q Exp # |
newtype ApiGatewayDispatcherOptions Source #
API Gateway specific dispatcher options
ApiGatewayDispatcherOptions | |
|
Instances
Lift ApiGatewayDispatcherOptions Source # | |
Defined in Aws.Lambda.Runtime.Common lift :: ApiGatewayDispatcherOptions -> Q Exp # |
data DispatcherStrategy Source #
A strategy on how to generate the dispatcher functions
Instances
Lift DispatcherStrategy Source # | |
Defined in Aws.Lambda.Runtime.Common lift :: DispatcherStrategy -> Q Exp # |
class ToLambdaResponseBody a where Source #
toStandaloneLambdaResponse :: a -> LambdaResponseBody Source #
Instances
ToJSON a => ToLambdaResponseBody a Source # | |
Defined in Aws.Lambda.Runtime.Common toStandaloneLambdaResponse :: a -> LambdaResponseBody Source # | |
ToLambdaResponseBody Text Source # | |
Defined in Aws.Lambda.Runtime.Common toStandaloneLambdaResponse :: Text -> LambdaResponseBody Source # | |
ToLambdaResponseBody String Source # | |
Defined in Aws.Lambda.Runtime.Common toStandaloneLambdaResponse :: String -> LambdaResponseBody Source # |
unLambdaResponseBody :: LambdaResponseBody -> Text Source #