aws-lambda-haskell-runtime-3.0.4: Haskell runtime for AWS Lambda

Safe HaskellNone
LanguageHaskell2010

Aws.Lambda

Synopsis

Documentation

data ApiGatewayRequest body Source #

data ApiGatewayResponse body Source #

Instances
Functor ApiGatewayResponse Source # 
Instance details

Defined in Aws.Lambda.Runtime.ApiGatewayInfo

Show body => Show (ApiGatewayResponse body) Source # 
Instance details

Defined in Aws.Lambda.Runtime.ApiGatewayInfo

Generic (ApiGatewayResponse body) Source # 
Instance details

Defined in Aws.Lambda.Runtime.ApiGatewayInfo

Associated Types

type Rep (ApiGatewayResponse body) :: Type -> Type #

ToJSON body => ToJSON (ApiGatewayResponse body) Source # 
Instance details

Defined in Aws.Lambda.Runtime.ApiGatewayInfo

type Rep (ApiGatewayResponse body) Source # 
Instance details

Defined in Aws.Lambda.Runtime.ApiGatewayInfo

type Rep (ApiGatewayResponse body) = D1 (MetaData "ApiGatewayResponse" "Aws.Lambda.Runtime.ApiGatewayInfo" "aws-lambda-haskell-runtime-3.0.4-F2AcvwPeu267KQkcJuRIfl" False) (C1 (MetaCons "ApiGatewayResponse" PrefixI True) ((S1 (MetaSel (Just "apiGatewayResponseStatusCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "apiGatewayResponseHeaders") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ResponseHeaders)) :*: (S1 (MetaSel (Just "apiGatewayResponseBody") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 body) :*: S1 (MetaSel (Just "apiGatewayResponseIsBase64Encoded") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool))))

data Context context Source #

Context that is passed to all the handlers

initialize :: Throws Parsing => Throws EnvironmentVariableNotSet => IORef context -> IO (Context context) Source #

Initializes the context out of the environment

setEventData :: Context context -> Event -> IO (Context context) Source #

Sets the context's event data

data LambdaOptions context Source #

Options that the generated main expects

Instances
Generic (LambdaOptions context) Source # 
Instance details

Defined in Aws.Lambda.Runtime.Common

Associated Types

type Rep (LambdaOptions context) :: Type -> Type #

Methods

from :: LambdaOptions context -> Rep (LambdaOptions context) x #

to :: Rep (LambdaOptions context) x -> LambdaOptions context #

type Rep (LambdaOptions context) Source # 
Instance details

Defined in Aws.Lambda.Runtime.Common

type Rep (LambdaOptions context) = D1 (MetaData "LambdaOptions" "Aws.Lambda.Runtime.Common" "aws-lambda-haskell-runtime-3.0.4-F2AcvwPeu267KQkcJuRIfl" 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)))))

generateLambdaDispatcher :: DispatcherStrategy -> DispatcherOptions -> DecsQ Source #

Generates a main function that acts as a dispatcher

decodeObj :: forall a. (FromJSON a, Typeable a) => ByteString -> Either Parsing a Source #

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.