Copyright | (c) Matthew Mosior 2023 |
---|---|
License | BSD-style |
Maintainer | mattm.github@gmail.com |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
WARNING
This module is considered internal.
The Package Versioning Policy does not apply.
The contents of this module may change in any way whatsoever and without any warning between minor versions of this package.
Authors importing this library are expected to track development closely.
All credit goes to the author(s)/maintainer(s) of the containers library for the above warning text.
Description
This library utilizes Streamly's superb performance characteristics to replace some of Yesod's functionality with streamly-based functionality.
Synopsis
- mkStaticFilesStreamly :: FilePath -> Int -> Q [Dec]
- mkStaticFilesStreamly' :: FilePath -> Bool -> Int -> Q [Dec]
- mkStaticFilesListStreamly :: FilePath -> [[String]] -> Bool -> Int -> Q [Dec]
- mkStaticFilesListStreamly' :: FilePath -> [([String], [String])] -> Bool -> Int -> Q [Dec]
- cachedETagLookupDevelStreamly :: FilePath -> Int -> IO ETagLookup
- cachedETagLookupStreamly :: FilePath -> Int -> IO ETagLookup
- mkHashMapStreamly :: FilePath -> Int -> IO (Map FilePath ByteString)
- notHiddenStreamly :: FilePath -> Bool
- getFileListPiecesStreamly :: FilePath -> IO [[String]]
- pathFromRawPiecesStreamly :: FilePath -> [String] -> FilePath
- base64md5FileStreamly :: FilePath -> Int -> IO String
- base64Streamly :: ByteString -> String
- hashFileStreamly :: (MonadIO m, HashAlgorithm hash) => FilePath -> Int -> m (Digest hash)
- sinkHashStreamly :: (Monad m, HashAlgorithm hash) => ByteString -> m (Digest hash)
Yesod.Static Replacement functions (INTERNAL)
mkStaticFilesStreamly :: FilePath -> Int -> Q [Dec] Source #
A replacement of mkStaticFiles.
mkStaticFilesStreamly' Source #
A replacement of mkStaticFiles'.
mkStaticFilesListStreamly Source #
:: FilePath | static directory |
-> [[String]] | list of files to create identifiers for |
-> Bool | append checksum query parameter |
-> Int | buffer size |
-> Q [Dec] |
A replacement of mkStaticFilesList.
mkStaticFilesListStreamly' Source #
:: FilePath | static directory |
-> [([String], [String])] | list of files to create identifiers for, where the first argument of the tuple is the identifier alias and the second is the actual file name |
-> Bool | append checksum query parameter |
-> Int | buffer size |
-> Q [Dec] |
A replacement of mkStaticFilesList'.
cachedETagLookupDevelStreamly :: FilePath -> Int -> IO ETagLookup Source #
A replacement of cachedETagLookupDevel.
cachedETagLookupStreamly :: FilePath -> Int -> IO ETagLookup Source #
A replacement of cachedETagLookup.
mkHashMapStreamly :: FilePath -> Int -> IO (Map FilePath ByteString) Source #
A replacement of mkHashMap.
getFileListPiecesStreamly :: FilePath -> IO [[String]] Source #
A replacement of getFileListPieces.
pathFromRawPiecesStreamly :: FilePath -> [String] -> FilePath Source #
A replacement of pathFromRawPieces.
base64md5FileStreamly :: FilePath -> Int -> IO String Source #
A replacement of base64md5File.
base64Streamly :: ByteString -> String Source #
A replacement of base64.
hashFileStreamly :: (MonadIO m, HashAlgorithm hash) => FilePath -> Int -> m (Digest hash) Source #
A more performant replacement of hashFile found in Crypto.Hash.Conduit.
sinkHashStreamly :: (Monad m, HashAlgorithm hash) => ByteString -> m (Digest hash) Source #
A more performant replacement of sinkHash found in Crypto.Hash.Conduit.