| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
PostgREST.Request.ApiRequest
Description
Synopsis
- data ApiRequest = ApiRequest {
- iAction :: Action
- iRange :: HashMap Text NonnegRange
- iTopLevelRange :: NonnegRange
- iTarget :: Target
- iPayload :: Maybe Payload
- iPreferRepresentation :: PreferRepresentation
- iPreferParameters :: Maybe PreferParameters
- iPreferCount :: Maybe PreferCount
- iPreferResolution :: Maybe PreferResolution
- iPreferTransaction :: Maybe PreferTransaction
- iFilters :: [(Text, Text)]
- iLogic :: [(Text, Text)]
- iSelect :: Maybe Text
- iOnConflict :: Maybe Text
- iColumns :: Set FieldName
- iOrder :: [(Text, Text)]
- iCanonicalQS :: ByteString
- iJWT :: Text
- iHeaders :: [(ByteString, ByteString)]
- iCookies :: [(ByteString, ByteString)]
- iPath :: ByteString
- iMethod :: ByteString
- iProfile :: Maybe Schema
- iSchema :: Schema
- iAcceptContentType :: ContentType
- data InvokeMethod
- data ContentType
- data Action
- data Target
- data Payload
- = ProcessedJSON {
- payRaw :: ByteString
- payKeys :: Set Text
- | RawJSON {
- payRaw :: ByteString
- | RawPay {
- payRaw :: ByteString
- = ProcessedJSON {
- userApiRequest :: AppConfig -> DbStructure -> Request -> RequestBody -> Either ApiRequestError ApiRequest
Documentation
data ApiRequest Source #
Describes what the user wants to do. This data type is a translation of the raw elements of an HTTP request into domain specific language. There is no guarantee that the intent is sensible, it is up to a later stage of processing to determine if it is an action we are able to perform.
Constructors
| ApiRequest | |
Fields
| |
data InvokeMethod Source #
Instances
| Eq InvokeMethod Source # | |
Defined in PostgREST.Request.ApiRequest | |
data ContentType Source #
Enumeration of currently supported response content types
Constructors
| CTApplicationJSON | |
| CTSingularJSON | |
| CTTextCSV | |
| CTTextPlain | |
| CTOpenAPI | |
| CTUrlEncoded | |
| CTOctetStream | |
| CTAny | |
| CTOther ByteString |
Instances
| Eq ContentType Source # | |
Defined in PostgREST.ContentType | |
Types of things a user wants to do to tablesviewsprocs
The target db object of a user action
Constructors
| TargetIdent QualifiedIdentifier | |
| TargetProc | |
Fields
| |
| TargetDefaultSpec | |
| TargetUnknown | |
Constructors
| ProcessedJSON | Cached attributes of a JSON payload |
Fields
| |
| RawJSON | |
Fields
| |
| RawPay | |
Fields
| |
userApiRequest :: AppConfig -> DbStructure -> Request -> RequestBody -> Either ApiRequestError ApiRequest Source #
Examines HTTP request and translates it into user intent.