antiope-s3 6.1.1 → 6.1.2
raw patch · 3 files changed
+43/−28 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Antiope.S3.Strict: downloadMap :: (MonadAWS m, MonadUnliftIO m) => (ByteString -> ByteString) -> BucketName -> ObjectKey -> m (Maybe ByteString)
+ Antiope.S3.Strict: downloadMapFromS3Uri :: (MonadAWS m, MonadUnliftIO m) => (ByteString -> ByteString) -> S3Uri -> m (Maybe ByteString)
+ Antiope.S3.Strict: unsafeDownloadMap :: (MonadAWS m, MonadUnliftIO m) => (ByteString -> ByteString) -> BucketName -> ObjectKey -> m ByteString
Files
- LICENSE +17/−26
- antiope-s3.cabal +2/−2
- src/Antiope/S3/Strict.hs +24/−0
LICENSE view
@@ -1,30 +1,21 @@-Copyright Arbor Networks (c) 2018--All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:+The MIT License (MIT) - * Redistributions of source code must retain the above copyright- notice, this list of conditions and the following disclaimer.+Copyright (c) 2018 Arbor Networks - * Redistributions in binary form must reproduce the above- copyright notice, this list of conditions and the following- disclaimer in the documentation and/or other materials provided- with the distribution.+Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions: - * Neither the name of Alexey Raga nor the names of other- contributors may be used to endorse or promote products derived- from this software without specific prior written permission.+The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
antiope-s3.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 19b4fae3538865f4994cfed0107b02fc384b3dafdfd9bd9b571193876b5134b2+-- hash: ffe49f5ed92045faacaef34f9862c4d951852c4549f7f680a2771e2b2a77400e name: antiope-s3-version: 6.1.1+version: 6.1.2 description: Please see the README on Github at <https://github.com/arbor/antiope#readme> category: Services homepage: https://github.com/arbor/antiope#readme
src/Antiope/S3/Strict.hs view
@@ -4,6 +4,10 @@ ( unsafeDownload , download , downloadFromS3Uri++ , unsafeDownloadMap+ , downloadMap+ , downloadMapFromS3Uri ) where import Antiope.Core ()@@ -34,3 +38,23 @@ => S3Uri -> m (Maybe BS.ByteString) downloadFromS3Uri s3Uri = runResourceT $ (LBS.toStrict <$!>) <$!> LBS.downloadFromS3Uri s3Uri++unsafeDownloadMap :: (MonadAWS m, MonadUnliftIO m)+ => (LBS.ByteString -> LBS.ByteString)+ -> AWS.BucketName+ -> AWS.ObjectKey+ -> m BS.ByteString+unsafeDownloadMap f bucketName objectKey = runResourceT $ LBS.toStrict <$!> (f <$> LBS.unsafeDownload bucketName objectKey)++downloadMap :: (MonadAWS m, MonadUnliftIO m)+ => (LBS.ByteString -> LBS.ByteString)+ -> AWS.BucketName+ -> AWS.ObjectKey+ -> m (Maybe BS.ByteString)+downloadMap f bucketName objectKey = runResourceT $ (LBS.toStrict <$!>) <$!> (fmap f <$> LBS.download bucketName objectKey)++downloadMapFromS3Uri :: (MonadAWS m, MonadUnliftIO m)+ => (LBS.ByteString -> LBS.ByteString)+ -> S3Uri+ -> m (Maybe BS.ByteString)+downloadMapFromS3Uri f s3Uri = runResourceT $ (LBS.toStrict <$!>) <$!> (fmap f <$> LBS.downloadFromS3Uri s3Uri)