Copyright | (c) Alexey Radkov 2016-2018 |
---|---|
License | BSD-style |
Maintainer | alexey.radkov@gmail.com |
Stability | stable |
Portability | non-portable (requires POSIX) |
Safe Haskell | None |
Language | Haskell98 |
Export regular haskell functions for using in directives of nginx-haskell-module.
- type ContentHandlerResult = (ByteString, ByteString, Int)
- type UnsafeContentHandlerResult = (ByteString, ByteString, Int)
- ngxExportSS :: Name -> Q [Dec]
- ngxExportSSS :: Name -> Q [Dec]
- ngxExportSLS :: Name -> Q [Dec]
- ngxExportBS :: Name -> Q [Dec]
- ngxExportBSS :: Name -> Q [Dec]
- ngxExportBLS :: Name -> Q [Dec]
- ngxExportYY :: Name -> Q [Dec]
- ngxExportBY :: Name -> Q [Dec]
- ngxExportIOYY :: Name -> Q [Dec]
- ngxExportAsyncIOYY :: Name -> Q [Dec]
- ngxExportAsyncOnReqBody :: Name -> Q [Dec]
- ngxExportServiceIOYY :: Name -> Q [Dec]
- ngxExportHandler :: Name -> Q [Dec]
- ngxExportDefHandler :: Name -> Q [Dec]
- ngxExportUnsafeHandler :: Name -> Q [Dec]
- ngxExportAsyncHandler :: Name -> Q [Dec]
- ngxExportAsyncHandlerOnReqBody :: Name -> Q [Dec]
- ngxExportServiceHook :: Name -> Q [Dec]
- ngxCyclePtr :: IO (Ptr ())
- ngxUpstreamMainConfPtr :: IO (Ptr ())
- ngxCachedTimePtr :: IO (Ptr ())
- newtype CInt :: * = CInt Int32
- newtype CUInt :: * = CUInt Word32
Type declarations
type ContentHandlerResult = (ByteString, ByteString, Int) Source #
The first element of the 3-tuple is content, the second is content type, and the third is HTTP status.
type UnsafeContentHandlerResult = (ByteString, ByteString, Int) Source #
The first element of the 3-tuple is content, the second is content type, and the third is HTTP status. Both the content and the content type are supposed to be referring to low-level string literals which do not need to be freed upon request termination and must not be garbage-collected in the Haskell RTS.
Exporters
ngxExportYY :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> ByteString
for using in directive haskell_run.
ngxExportBY :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> Bool
for using in directive haskell_run.
ngxExportIOYY :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> IO
ByteString
for using in directive haskell_run.
ngxExportAsyncIOYY :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> IO
ByteString
for using in directive haskell_run_async.
ngxExportAsyncOnReqBody :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> ByteString
-> IO
ByteString
for using in directive haskell_run_async_on_request_body.
The first argument of the exported function contains buffers of the client request body.
ngxExportServiceIOYY :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> Bool
-> IO
ByteString
for using in directive haskell_run_service.
The boolean argument of the exported function marks that the service is being run for the first time.
ngxExportHandler :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> ContentHandlerResult
for using in directives haskell_content and haskell_static_content.
ngxExportDefHandler :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> ByteString
for using in directives haskell_content and haskell_static_content.
ngxExportUnsafeHandler :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> UnsafeContentHandlerResult
for using in directive haskell_unsafe_content.
ngxExportAsyncHandler :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> IO
ContentHandlerResult
for using in directive haskell_async_content.
ngxExportAsyncHandlerOnReqBody :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> ByteString
-> IO
ContentHandlerResult
for using in directive haskell_async_content_on_request_body.
The first argument of the exported function contains buffers of the client request body.
ngxExportServiceHook :: Name -> Q [Dec] Source #
Exports a function of type
ByteString
-> IO
ByteString
for using in directive haskell_service_hook.
Opaque pointers to Nginx global objects
ngxCyclePtr :: IO (Ptr ()) Source #
Returns an opaque pointer to the Nginx cycle object for using it in C plugins.
ngxUpstreamMainConfPtr :: IO (Ptr ()) Source #
Returns an opaque pointer to the Nginx upstream main configuration for using it in C plugins.
ngxCachedTimePtr :: IO (Ptr ()) Source #
Returns an opaque pointer to the Nginx cached time object for using it in C plugins.
Re-exported data constructors from Foreign.C
Haskell type representing the C int
type.