Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data MetadataResponseTransform = MetadataResponseTransform {}
- data RequestTransform = RequestTransform {}
- type RequestTransformFns = RequestFields (WithOptional TransformFn)
- type RequestData = RequestFields Identity
- data RequestFields f = RequestFields {
- method :: f Method
- url :: f Url
- body :: f Body
- queryParams :: f QueryParams
- requestHeaders :: f Headers
- type RequestContext = RequestFields TransformCtx
Documentation
data MetadataResponseTransform Source #
Instances
data RequestTransform Source #
RequestTransform
is the metadata representation of a request
transformation. It consists of a record of higher kinded data (HKD)
along with some regular data. We seperate the HKD data into its own
record field called requestFields
which we nest inside our
non-HKD record. The actual transformation operations are contained
in the HKD.
Instances
type RequestTransformFns = RequestFields (WithOptional TransformFn) Source #
Defunctionalized Webhook Request Transformation
We represent a defunctionalized request transformation by parameterizing
our HKD with WithOptional
TransformFn
, which marks each of the fields
as optional and supplies the appropriate transformation function to them if
if they are provided.
type RequestData = RequestFields Identity Source #
Actual Request Data
We represent the actual request data by parameterizing our HKD with
Identity
, which allows us to trivially unwrap the fields (which should
exist after any transformations have been applied).
data RequestFields f Source #
This is our HKD type. It is a record with fields for each
component of an Request
we wish to transform.
RequestFields | |
|