Copyright | (c) Ragon Creswick, 2009-2012 Mateusz Kowalczyk, 2014-2015 |
---|---|
License | GPL-3 |
Safe Haskell | None |
Language | Haskell98 |
Configuration and communication with lpaste.net
- data Config = Config {}
- config :: String -> Config
- postWithDefaults :: String -> IO URI
- outHandler :: String -> IO ()
- defaultUri :: String
- saveUri :: String -> URI
- buildURI :: String -> String -> URI
- post :: Config -> String -> IO URI
- mkPrivatePair :: Config -> (String, String)
- buildRequest :: Config -> String -> Request String
- fakePost :: Config -> String -> IO URI
Documentation
Configuration type for PastePipe:
postWithDefaults :: String -> IO URI Source
Takes a string to post to the default and returns the URI. Client code is expected to catch any exceptions.
outHandler :: String -> IO () Source
Define an output handler based on the user-specified verbosity.
The "root" uri for lpaste.net
saveUri :: String -> URI Source
The URI for posting new pastes to lpaste. This isn't guaranteed to trigger a failure on all execution paths, as-is.
post :: Config -> String -> IO URI Source
Posts the given content to lpaste.net, returning the new uri.
mkPrivatePair :: Config -> (String, String) Source
Make a pair suitable for encoding out of private
setting.