-- 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 2.0.6 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 :: RunCallback -> IO () -- | Wrapper type to handle the result of the user data LambdaResult StandaloneLambdaResult :: String -> LambdaResult ApiGatewayResult :: ApiGatewayResponse Value -> 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 -> !HashMap Text Text -> !Maybe [(Text, Maybe 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 -> !HashMap Text Text [$sel:apiGatewayRequestQueryStringParameters:ApiGatewayRequest] :: ApiGatewayRequest body -> !Maybe [(Text, Maybe 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 mkApiGatewayResponse :: Int -> payload -> ApiGatewayResponse payload -- | Context that is passed to all the handlers data Context Context :: !Int -> !String -> !String -> !String -> !String -> !String -> !String -> !String -> !Int -> Context [memoryLimitInMb] :: Context -> !Int [functionName] :: Context -> !String [functionVersion] :: Context -> !String [invokedFunctionArn] :: Context -> !String [awsRequestId] :: Context -> !String [xrayTraceId] :: Context -> !String [logStreamName] :: Context -> !String [logGroupName] :: Context -> !String [deadline] :: Context -> !Int -- | Initializes the context out of the environment initialize :: Throws Parsing => Throws EnvironmentVariableNotSet => Event -> IO Context -- | Options that the generated main expects data LambdaOptions LambdaOptions :: !String -> !String -> !String -> !String -> LambdaOptions [eventObject] :: LambdaOptions -> !String [contextObject] :: LambdaOptions -> !String [functionHandler] :: LambdaOptions -> !String [executionUuid] :: LambdaOptions -> !String -- | 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) => String -> Either Parsing a -- | 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. encodeObj :: ToJSON a => a -> String