-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A Slack middleware for WAI
--   
--   Logs the request information into Slack through webhook from a WAI
--   application.
@package wai-slack-middleware
@version 0.2.0

module Network.Wai.Middleware.Slack

-- | Slack configuration for the middleware. Slack notification will be
--   emitted only if this evaluates to True: <a>responseFilter</a>
--   &amp;&amp; <a>requestFilter</a>. This comes handy in situations where
--   you don't want to send notifications for certain <a>Request</a>s even
--   if <a>responseFilter</a> results in <a>True</a>.
data SlackConfig
SlackConfig :: String -> Manager -> Response -> Bool -> Request -> Bool -> SlackConfig

-- | Slack webhook URL
[webHookUrl] :: SlackConfig -> String
[httpManager] :: SlackConfig -> Manager

-- | If <a>True</a>, check <a>requestFilter</a> to see if slack notiication
--   needs to be sent. On False, no slack notification is sent.
[responseFilter] :: SlackConfig -> Response -> Bool

-- | If <a>True</a>, show slack notification. Else no slack notification is
--   sent. Note that this condition is only checked if
--   <a>responseFilter</a> is <a>True</a>.
[requestFilter] :: SlackConfig -> Request -> Bool

-- | Slack middleware for Wai. Use the <tt>logStatus</tt> to control on
--   which status you want to log the request information in Slack.
slack :: SlackConfig -> Middleware
