module Network.Mattermost.Types.Base where
import qualified Data.Aeson as A
import Data.Text (Text)
import Network.HTTP.Base (RequestMethod)
type Hostname = Text
type Port = Int
type Logger = LogEvent -> IO ()
data LogEvent = LogEvent
{ logFunction :: String
, logEventType :: LogEventType
} deriving (Eq, Show)
data LogEventType
= HttpRequest RequestMethod String (Maybe A.Value)
| HttpResponse Int String (Maybe A.Value)
| WebSocketRequest A.Value
| WebSocketResponse A.Value
| WebSocketPing
| WebSocketPong
deriving (Eq, Show)