Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.Mattermost.Types.Internal
Description
The types defined in this module are exported to facilitate efforts such as QuickCheck and other instrospection efforts, but users are advised to avoid using these types wherever possible: they can be used in a manner that would cause significant disruption and may be subject to change without being reflected in the mattermost-api version.
Synopsis
- data Token = Token String
- getTokenString :: Token -> String
- data AutoClose
- autoCloseToHeader :: AutoClose -> [Header]
- data MMConn = MMConn {
- fromMMConn :: Connection
- connConnected :: IORef Bool
- closeMMConn :: MMConn -> IO ()
- newMMConn :: Connection -> IO MMConn
- isConnected :: MMConn -> IO Bool
- maxLineLength :: Int
- dropTrailingChar :: ByteString -> ByteString
- data ConnectionType
- = ConnectHTTPS Bool
- | ConnectHTTP
- data ConnectionData = ConnectionData {
- cdHostname :: Hostname
- cdPort :: Port
- cdUrlPath :: Text
- cdAutoClose :: AutoClose
- cdConnectionPool :: Pool MMConn
- cdConnectionCtx :: ConnectionContext
- cdToken :: Maybe Token
- cdLogger :: Maybe Logger
- cdConnectionType :: ConnectionType
Documentation
Constructors
Token String |
getTokenString :: Token -> String Source #
autoCloseToHeader :: AutoClose -> [Header] Source #
We return a list of headers so that we can treat the headers like a monoid.
Constructors
MMConn | |
Fields
|
Instances
Stream MMConn Source # | This instance allows us to use |
Defined in Network.Mattermost.Types.Internal Methods readLine :: MMConn -> IO (Result String) readBlock :: MMConn -> Int -> IO (Result String) writeBlock :: MMConn -> String -> IO (Result ()) closeOnEnd :: MMConn -> Bool -> IO () |
closeMMConn :: MMConn -> IO () Source #
isConnected :: MMConn -> IO Bool Source #
maxLineLength :: Int Source #
dropTrailingChar :: ByteString -> ByteString Source #
HTTP ends newlines with rn sequence, but the connection
package doesn't
know this so we need to drop the r after reading lines. This should only be
needed in your compatibility with the HTTP library.
data ConnectionType Source #
Constructors
ConnectHTTPS Bool | Boolean is whether to require trusted certificate |
ConnectHTTP | Make an insecure connection over HTTP |
Instances
Eq ConnectionType Source # | |
Defined in Network.Mattermost.Types.Internal Methods (==) :: ConnectionType -> ConnectionType -> Bool (/=) :: ConnectionType -> ConnectionType -> Bool | |
Read ConnectionType Source # | |
Defined in Network.Mattermost.Types.Internal Methods readsPrec :: Int -> ReadS ConnectionType readList :: ReadS [ConnectionType] readPrec :: ReadPrec ConnectionType readListPrec :: ReadPrec [ConnectionType] | |
Show ConnectionType Source # | |
Defined in Network.Mattermost.Types.Internal Methods showsPrec :: Int -> ConnectionType -> ShowS show :: ConnectionType -> String showList :: [ConnectionType] -> ShowS |
data ConnectionData Source #
Constructors
ConnectionData | |
Fields
|