-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell runtime for AWS Lambda -- -- Please see the README on GitHub at -- https://github.com/theam/aws-lambda-haskell-runtime#readme @package aws-lambda-haskell-runtime @version 3.0.4 module Aws.Lambda.Runtime -- | Runs the user haskell_lambda executable and posts back the -- results. This is called from the layer's main function. runLambda :: forall context. IO context -> RunCallback context -> IO () -- | Wrapper type to handle the result of the user data LambdaResult StandaloneLambdaResult :: LambdaResponseBody -> LambdaResult ApiGatewayResult :: ApiGatewayResponse ApiGatewayResponseBody -> LambdaResult -- | A strategy on how to generate the dispatcher functions data DispatcherStrategy UseWithAPIGateway :: DispatcherStrategy StandaloneLambda :: DispatcherStrategy -- | Options that the dispatcher generator expects newtype DispatcherOptions DispatcherOptions :: ApiGatewayDispatcherOptions -> DispatcherOptions [apiGatewayDispatcherOptions] :: DispatcherOptions -> ApiGatewayDispatcherOptions -- | API Gateway specific dispatcher options newtype ApiGatewayDispatcherOptions ApiGatewayDispatcherOptions :: Bool -> ApiGatewayDispatcherOptions -- | Should impure exceptions be propagated through the API Gateway -- interface [propagateImpureExceptions] :: ApiGatewayDispatcherOptions -> Bool defaultDispatcherOptions :: DispatcherOptions data Parsing Parsing :: String -> String -> String -> Parsing [errorMessage] :: Parsing -> String [actualValue] :: Parsing -> String [valueName] :: Parsing -> String module Aws.Lambda data ApiGatewayRequest body ApiGatewayRequest :: !Text -> !Text -> !Text -> !Maybe (HashMap Text Text) -> !Maybe (HashMap Text Text) -> !Maybe (HashMap Text Text) -> !Maybe (HashMap Text Text) -> !Bool -> !ApiGatewayRequestContext -> !Maybe body -> ApiGatewayRequest body [$sel:apiGatewayRequestResource:ApiGatewayRequest] :: ApiGatewayRequest body -> !Text [$sel:apiGatewayRequestPath:ApiGatewayRequest] :: ApiGatewayRequest body -> !Text [$sel:apiGatewayRequestHttpMethod:ApiGatewayRequest] :: ApiGatewayRequest body -> !Text [$sel:apiGatewayRequestHeaders:ApiGatewayRequest] :: ApiGatewayRequest body -> !Maybe (HashMap Text Text) [$sel:apiGatewayRequestQueryStringParameters:ApiGatewayRequest] :: ApiGatewayRequest body -> !Maybe (HashMap Text Text) [$sel:apiGatewayRequestPathParameters:ApiGatewayRequest] :: ApiGatewayRequest body -> !Maybe (HashMap Text Text) [$sel:apiGatewayRequestStageVariables:ApiGatewayRequest] :: ApiGatewayRequest body -> !Maybe (HashMap Text Text) [$sel:apiGatewayRequestIsBase64Encoded:ApiGatewayRequest] :: ApiGatewayRequest body -> !Bool [$sel:apiGatewayRequestRequestContext:ApiGatewayRequest] :: ApiGatewayRequest body -> !ApiGatewayRequestContext [$sel:apiGatewayRequestBody:ApiGatewayRequest] :: ApiGatewayRequest body -> !Maybe body data ApiGatewayRequestContext ApiGatewayRequestContext :: !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !Text -> !ApiGatewayRequestContextIdentity -> ApiGatewayRequestContext [$sel:apiGatewayRequestContextResourceId:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextResourcePath:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextHttpMethod:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextExtendedRequestId:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextRequestTime:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextPath:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextAccountId:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextProtocol:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextStage:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextDomainPrefix:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextRequestId:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextDomainName:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextApiId:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !Text [$sel:apiGatewayRequestContextIdentity:ApiGatewayRequestContext] :: ApiGatewayRequestContext -> !ApiGatewayRequestContextIdentity data ApiGatewayRequestContextIdentity ApiGatewayRequestContextIdentity :: !Maybe Text -> !Maybe Text -> !Maybe Text -> !Maybe Text -> !Maybe Text -> !Maybe Text -> !Maybe Text -> !Maybe Text -> !Maybe Value -> !Maybe Text -> !Maybe Text -> !Maybe Text -> ApiGatewayRequestContextIdentity [$sel:apiGatewayRequestContextIdentityCognitoIdentityPoolId:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentityAccountId:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentityCognitoIdentityId:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentityCaller:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentitySourceIp:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentityPrincipalOrgId:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentityAccesskey:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentityCognitoAuthenticationType:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentityCognitoAuthenticationProvider:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Value [$sel:apiGatewayRequestContextIdentityUserArn:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentityUserAgent:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text [$sel:apiGatewayRequestContextIdentityUser:ApiGatewayRequestContextIdentity] :: ApiGatewayRequestContextIdentity -> !Maybe Text data ApiGatewayResponse body ApiGatewayResponse :: !Int -> !ResponseHeaders -> !body -> !Bool -> ApiGatewayResponse body [$sel:apiGatewayResponseStatusCode:ApiGatewayResponse] :: ApiGatewayResponse body -> !Int [$sel:apiGatewayResponseHeaders:ApiGatewayResponse] :: ApiGatewayResponse body -> !ResponseHeaders [$sel:apiGatewayResponseBody:ApiGatewayResponse] :: ApiGatewayResponse body -> !body [$sel:apiGatewayResponseIsBase64Encoded:ApiGatewayResponse] :: ApiGatewayResponse body -> !Bool newtype ApiGatewayResponseBody ApiGatewayResponseBody :: Text -> ApiGatewayResponseBody class ToApiGatewayResponseBody a toApiGatewayResponseBody :: ToApiGatewayResponseBody a => a -> ApiGatewayResponseBody mkApiGatewayResponse :: Int -> payload -> ApiGatewayResponse payload -- | Context that is passed to all the handlers data Context context Context :: !Int -> !String -> !String -> !String -> !String -> !String -> !String -> !String -> !Int -> !IORef context -> Context context [memoryLimitInMb] :: Context context -> !Int [functionName] :: Context context -> !String [functionVersion] :: Context context -> !String [invokedFunctionArn] :: Context context -> !String [awsRequestId] :: Context context -> !String [xrayTraceId] :: Context context -> !String [logStreamName] :: Context context -> !String [logGroupName] :: Context context -> !String [deadline] :: Context context -> !Int [customContext] :: Context context -> !IORef context -- | Initializes the context out of the environment initialize :: Throws Parsing => Throws EnvironmentVariableNotSet => IORef context -> IO (Context context) -- | Sets the context's event data setEventData :: Context context -> Event -> IO (Context context) -- | Options that the generated main expects data LambdaOptions context LambdaOptions :: !ByteString -> !String -> !String -> !Context context -> LambdaOptions context [eventObject] :: LambdaOptions context -> !ByteString [functionHandler] :: LambdaOptions context -> !String [executionUuid] :: LambdaOptions context -> !String [contextObject] :: LambdaOptions context -> !Context context -- | Generates a main function that acts as a dispatcher generateLambdaDispatcher :: DispatcherStrategy -> DispatcherOptions -> DecsQ -- | Helper function that the dispatcher will use to decode the JSON that -- comes as an AWS Lambda event into the appropriate type expected by the -- handler. decodeObj :: forall a. (FromJSON a, Typeable a) => ByteString -> Either Parsing a