packages feed

aws 0.24.4 → 0.25

raw patch · 17 files changed

+58/−52 lines, 17 filesdep +cryptondep −cryptonitedep −ghc-primdep −semigroupsdep ~networkPVP ok

version bump matches the API change (PVP)

Dependencies added: crypton

Dependencies removed: cryptonite, ghc-prim, semigroups

Dependency ranges changed: network

API changes (from Hackage documentation)

- Aws: type ResponseMetadata resp
- Aws: type ServiceConfiguration request :: Type -> Type
+ Aws: type family ServiceConfiguration request :: Type -> Type
+ Aws.S3.Commands.PutObject: [poTagging] :: PutObject -> [(Text, Text)]
- Aws: awsIteratedList :: (IteratedTransaction r a, ListResponse a i) => Configuration -> ServiceConfiguration r NormalQuery -> Manager -> r -> forall j. ConduitT j i (ResourceT IO) ()
+ Aws: awsIteratedList :: (IteratedTransaction r a, ListResponse a i) => Configuration -> ServiceConfiguration r NormalQuery -> Manager -> r -> forall j. () => ConduitT j i (ResourceT IO) ()
- Aws: awsIteratedSource :: IteratedTransaction r a => Configuration -> ServiceConfiguration r NormalQuery -> Manager -> r -> forall i. ConduitT i (Response (ResponseMetadata a) a) (ResourceT IO) ()
+ Aws: awsIteratedSource :: IteratedTransaction r a => Configuration -> ServiceConfiguration r NormalQuery -> Manager -> r -> forall i. () => ConduitT i (Response (ResponseMetadata a) a) (ResourceT IO) ()
- Aws: class (SignQuery r, ResponseConsumer r a, Loggable (ResponseMetadata a)) => Transaction r a | r -> a
+ Aws: class (SignQuery r, ResponseConsumer r a, Loggable ResponseMetadata a) => Transaction r a | r -> a
- Aws: type HTTPResponseConsumer a = Response (ConduitM () ByteString (ResourceT IO) ()) -> ResourceT IO a
+ Aws: type HTTPResponseConsumer a = Response ConduitM () ByteString ResourceT IO () -> ResourceT IO a
- Aws: type MemoryResponse resp :: Type;
+ Aws: type MemoryResponse resp;
- Aws.Aws: awsIteratedList :: (IteratedTransaction r a, ListResponse a i) => Configuration -> ServiceConfiguration r NormalQuery -> Manager -> r -> forall j. ConduitT j i (ResourceT IO) ()
+ Aws.Aws: awsIteratedList :: (IteratedTransaction r a, ListResponse a i) => Configuration -> ServiceConfiguration r NormalQuery -> Manager -> r -> forall j. () => ConduitT j i (ResourceT IO) ()
- Aws.Aws: awsIteratedList' :: (Monad m, IteratedTransaction r b, ListResponse b c) => (r -> m b) -> r -> forall i. ConduitT i c m ()
+ Aws.Aws: awsIteratedList' :: (Monad m, IteratedTransaction r b, ListResponse b c) => (r -> m b) -> r -> forall i. () => ConduitT i c m ()
- Aws.Aws: awsIteratedSource :: IteratedTransaction r a => Configuration -> ServiceConfiguration r NormalQuery -> Manager -> r -> forall i. ConduitT i (Response (ResponseMetadata a) a) (ResourceT IO) ()
+ Aws.Aws: awsIteratedSource :: IteratedTransaction r a => Configuration -> ServiceConfiguration r NormalQuery -> Manager -> r -> forall i. () => ConduitT i (Response (ResponseMetadata a) a) (ResourceT IO) ()
- Aws.Aws: awsIteratedSource' :: (Monad m, IteratedTransaction r a) => (r -> m (a, b)) -> r -> forall i. ConduitT i b m ()
+ Aws.Aws: awsIteratedSource' :: (Monad m, IteratedTransaction r a) => (r -> m (a, b)) -> r -> forall i. () => ConduitT i b m ()
- Aws.Core: class Monoid (ResponseMetadata resp) => ResponseConsumer req resp where {
+ Aws.Core: class Monoid ResponseMetadata resp => ResponseConsumer req resp where {
- Aws.Core: class (SignQuery r, ResponseConsumer r a, Loggable (ResponseMetadata a)) => Transaction r a | r -> a
+ Aws.Core: class (SignQuery r, ResponseConsumer r a, Loggable ResponseMetadata a) => Transaction r a | r -> a
- Aws.Core: type HTTPResponseConsumer a = Response (ConduitM () ByteString (ResourceT IO) ()) -> ResourceT IO a
+ Aws.Core: type HTTPResponseConsumer a = Response ConduitM () ByteString ResourceT IO () -> ResourceT IO a
- Aws.Core: type MemoryResponse resp :: Type;
+ Aws.Core: type MemoryResponse resp;
- Aws.DynamoDb.Core: Parser :: (forall f r. Failure f r -> Success a f r -> f r) -> Parser a
+ Aws.DynamoDb.Core: Parser :: (forall (f :: Type -> Type) r. () => Failure f r -> Success a f r -> f r) -> Parser a
- Aws.DynamoDb.Core: [runParser] :: Parser a -> forall f r. Failure f r -> Success a f r -> f r
+ Aws.DynamoDb.Core: [runParser] :: Parser a -> forall (f :: Type -> Type) r. () => Failure f r -> Success a f r -> f r
- Aws.DynamoDb.Core: class DynData (DynRep a) => DynVal a where {
+ Aws.DynamoDb.Core: class DynData DynRep a => DynVal a where {
- Aws.DynamoDb.Core: getAttr :: forall a. (Typeable a, DynVal a) => Text -> Item -> Parser a
+ Aws.DynamoDb.Core: getAttr :: (Typeable a, DynVal a) => Text -> Item -> Parser a
- Aws.DynamoDb.Core: getAttr' :: forall a. DynVal a => Text -> Item -> Parser (Maybe a)
+ Aws.DynamoDb.Core: getAttr' :: DynVal a => Text -> Item -> Parser (Maybe a)
- Aws.S3.Commands.Multipart: chunkedConduit :: MonadResource m => Integer -> ConduitT ByteString ByteString m ()
+ Aws.S3.Commands.Multipart: chunkedConduit :: forall (m :: Type -> Type). MonadResource m => Integer -> ConduitT ByteString ByteString m ()
- Aws.S3.Commands.Multipart: multipartUploadSink :: MonadResource m => Configuration -> S3Configuration NormalQuery -> Manager -> Text -> Text -> Integer -> ConduitT ByteString Void m ()
+ Aws.S3.Commands.Multipart: multipartUploadSink :: forall (m :: Type -> Type). MonadResource m => Configuration -> S3Configuration NormalQuery -> Manager -> Text -> Text -> Integer -> ConduitT ByteString Void m ()
- Aws.S3.Commands.Multipart: multipartUploadSinkWithInitiator :: MonadResource m => Configuration -> S3Configuration NormalQuery -> (Bucket -> Text -> InitiateMultipartUpload) -> Manager -> Text -> Text -> Integer -> ConduitT ByteString Void m ()
+ Aws.S3.Commands.Multipart: multipartUploadSinkWithInitiator :: forall (m :: Type -> Type). MonadResource m => Configuration -> S3Configuration NormalQuery -> (Bucket -> Text -> InitiateMultipartUpload) -> Manager -> Text -> Text -> Integer -> ConduitT ByteString Void m ()
- Aws.S3.Commands.Multipart: putConduit :: MonadResource m => Configuration -> S3Configuration NormalQuery -> Manager -> Text -> Text -> Text -> ConduitT ByteString Text m ()
+ Aws.S3.Commands.Multipart: putConduit :: forall (m :: Type -> Type). MonadResource m => Configuration -> S3Configuration NormalQuery -> Manager -> Text -> Text -> Text -> ConduitT ByteString Text m ()
- Aws.S3.Commands.PutObject: PutObject :: Text -> Bucket -> Maybe ByteString -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe (Digest MD5) -> Maybe Int -> Maybe CannedAcl -> Maybe StorageClass -> Maybe Text -> Maybe ServerSideEncryption -> RequestBody -> [(Text, Text)] -> Bool -> Bool -> PutObject
+ Aws.S3.Commands.PutObject: PutObject :: Text -> Bucket -> Maybe ByteString -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe (Digest MD5) -> Maybe Int -> Maybe CannedAcl -> Maybe StorageClass -> Maybe Text -> Maybe ServerSideEncryption -> RequestBody -> [(Text, Text)] -> Bool -> Bool -> [(Text, Text)] -> PutObject

Files

Aws/Core.hs view
@@ -185,7 +185,7 @@     (<*>) = ap  instance Monoid m => Monad (Response m) where-    return x = Response mempty (Right x)+    return = pure     Response m1 (Left e) >>= _ = Response m1 (Left e)     Response m1 (Right x) >>= f = let Response m2 y = f x                                   in Response (m1 `mappend` m2) y -- currently using First-semantics, Last SHOULD work too@@ -497,7 +497,7 @@                               ++ sqOtherHeaders       , HTTP.requestBody = -        -- An explicityly defined body parameter should overwrite everything else.+        -- An explicitly defined body parameter should overwrite everything else.         case sqBody of           Just x -> x           Nothing ->@@ -524,7 +524,7 @@                          PostQuery -> Just "application/x-www-form-urlencoded; charset=utf-8"                          _ -> Nothing --- | Create a URI fro a 'SignedQuery' object.+-- | Create a URI from a 'SignedQuery' object. -- -- Unused / incompatible fields will be silently ignored. queryToUri :: SignedQuery -> B.ByteString
Aws/DynamoDb/Commands/BatchWriteItem.hs view
@@ -25,7 +25,7 @@ import           Control.Applicative import           Data.Aeson import           Data.Default-import           Data.Foldable (asum)+import qualified Data.Foldable as F (asum) import qualified Data.HashMap.Strict as HM import qualified Data.Text           as T import           Prelude@@ -89,7 +89,7 @@ instance FromJSON Request where     parseJSON = withObject "PutRequest or DeleteRequest" $ \o ->      -     asum [+     F.asum [            do              pr <- o .: "PutRequest"              i  <- pr .: "Item"
Aws/DynamoDb/Commands/DeleteItem.hs view
@@ -39,7 +39,7 @@     , diKey     :: PrimaryKey     -- ^ The item to delete.     , diExpect  :: Conditions-    -- ^ (Possible) set of expections for a conditional Put+    -- ^ (Possible) set of exceptions for a conditional Put     , diReturn  :: UpdateReturn     -- ^ What to return from this query.     , diRetCons :: ReturnConsumption
Aws/DynamoDb/Commands/PutItem.hs view
@@ -40,7 +40,7 @@     -- ^ An item to Put. Attributes here will replace what maybe under     -- the key on DDB.     , piExpect  :: Conditions-    -- ^ (Possible) set of expections for a conditional Put+    -- ^ (Possible) set of exceptions for a conditional Put     , piReturn  :: UpdateReturn     -- ^ What to return from this query.     , piRetCons :: ReturnConsumption
Aws/DynamoDb/Commands/UpdateItem.hs view
@@ -105,7 +105,7 @@ -- -- @http:\/\/docs.aws.amazon.com\/amazondynamodb\/latest\/APIReference\/API_UpdateItem.html@ data UpdateAction-    = UPut                      -- ^ Simpley write, overwriting any previous value+    = UPut                      -- ^ Simply write, overwriting any previous value     | UAdd                      -- ^ Numerical add or add to set.     | UDelete                   -- ^ Empty value: remove; Set value: Subtract from set.     deriving (Eq,Show,Read,Ord)
Aws/DynamoDb/Core.hs view
@@ -1254,7 +1254,7 @@     m >>= g = Parser $ \kf ks -> let ks' a = runParser (g a) kf ks                                  in runParser m kf ks'     {-# INLINE (>>=) #-}-    return a = Parser $ \_kf ks -> ks a+    return = pure     {-# INLINE return #-} #if !(MIN_VERSION_base(4,13,0))     fail msg = Parser $ \kf _ks -> kf msg@@ -1273,7 +1273,7 @@     {-# INLINE fmap #-}  instance Applicative Parser where-    pure  = return+    pure a = Parser $ \_kf ks -> ks a     {-# INLINE pure #-}     (<*>) = apP     {-# INLINE (<*>) #-}
Aws/Iam/Commands/GetGroupPolicy.hs view
@@ -18,7 +18,7 @@ import           Text.XML.Cursor     (($//)) import           Prelude --- | Retreives the specified policy document for the specified group.+-- | Retrieves the specified policy document for the specified group. -- -- <http://docs.aws.amazon.com/IAM/latest/APIReference/API_GetGroupPolicy.html> data GetGroupPolicy
Aws/Iam/Commands/GetUser.hs view
@@ -15,7 +15,7 @@ import           Data.Typeable import           Prelude --- | Retreives information about the given user.+-- | Retrieves information about the given user. -- -- If a user name is not given, IAM determines the user name based on the -- access key signing the request.
Aws/Iam/Commands/GetUserPolicy.hs view
@@ -18,7 +18,7 @@ import           Text.XML.Cursor     (($//)) import           Prelude --- | Retreives the specified policy document for the specified user.+-- | Retrieves the specified policy document for the specified user. -- -- <http://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUserPolicy.html> data GetUserPolicy
Aws/S3/Commands/PutObject.hs view
@@ -5,16 +5,17 @@ import           Aws.Core import           Aws.S3.Core import           Control.Applicative-import           Control.Arrow         (second)-import qualified Crypto.Hash           as CH-import           Data.ByteString.Char8 ({- IsString -})+import           Control.Arrow          (second)+import qualified Crypto.Hash            as CH+import           Data.ByteString.Char8  ({- IsString -}) import           Data.Maybe-import qualified Data.ByteString.Char8 as B-import qualified Data.CaseInsensitive  as CI-import qualified Data.Text             as T-import qualified Data.Text.Encoding    as T+import qualified Data.ByteString.Char8  as B+import qualified Data.CaseInsensitive   as CI+import qualified Data.Text              as T+import qualified Data.Text.Encoding     as T import           Prelude-import qualified Network.HTTP.Conduit  as HTTP+import qualified Network.HTTP.Conduit   as HTTP+import qualified Network.HTTP.Types.URI as URI  data PutObject = PutObject {   poObjectName :: T.Text,@@ -32,11 +33,12 @@   poRequestBody  :: HTTP.RequestBody,   poMetadata :: [(T.Text,T.Text)],   poAutoMakeBucket :: Bool, -- ^ Internet Archive S3 nonstandard extension-  poExpect100Continue :: Bool -- ^ Note: Requires http-client >= 0.4.10+  poExpect100Continue :: Bool, -- ^ Note: Requires http-client >= 0.4.10+  poTagging :: [(T.Text,T.Text)] -- ^ tag-set as key/value pairs }  putObject :: Bucket -> T.Text -> HTTP.RequestBody -> PutObject-putObject bucket obj body = PutObject obj bucket Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing body [] False False+putObject bucket obj body = PutObject obj bucket Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing body [] False False []  data PutObjectResponse   = PutObjectResponse@@ -55,13 +57,16 @@                                , s3QQuery = []                                , s3QContentType = poContentType                                , s3QContentMd5 = poContentMD5-                               , s3QAmzHeaders = map (second T.encodeUtf8) $ catMaybes [+                               , s3QAmzHeaders = map (second T.encodeUtf8) (catMaybes [                                               ("x-amz-acl",) <$> writeCannedAcl <$> poAcl                                             , ("x-amz-storage-class",) <$> writeStorageClass <$> poStorageClass                                             , ("x-amz-website-redirect-location",) <$> poWebsiteRedirectLocation                                             , ("x-amz-server-side-encryption",) <$> writeServerSideEncryption <$> poServerSideEncryption                                             , if poAutoMakeBucket then Just ("x-amz-auto-make-bucket", "1")  else Nothing                                             ] ++ map( \x -> (CI.mk . T.encodeUtf8 $ T.concat ["x-amz-meta-", fst x], snd x)) poMetadata+                                            ) ++ if null poTagging+                                                then []+                                                else [("x-amz-tagging", URI.renderQuery False $ URI.queryTextToQuery $ map (second Just) poTagging)]                                , s3QOtherHeaders = map (second T.encodeUtf8) $ catMaybes [                                               ("Expires",) . T.pack . show <$> poExpires                                             , ("Cache-Control",) <$> poCacheControl
Aws/Sqs/Commands/Message.hs view
@@ -19,7 +19,7 @@ , ReceiveMessage(..) , ReceiveMessageResponse(..) --- * Change Message Visiblity+-- * Change Message Visibility , ChangeMessageVisibility(..) , ChangeMessageVisibilityResponse(..) ) where@@ -426,7 +426,7 @@ -- <http://queue.amazonaws.com/doc/2012-11-05/QueueService.wsdl> -- all elements except for the attributes are specified as required. -- At least for the field 'mMD5OfMessageAttributes' the the service--- is not always returning a value and therefor we make this field optional.+-- is not always returning a value and therefore we make this field optional. -- data Message = Message     { mMessageId :: !T.Text@@ -508,7 +508,7 @@             return $ UserMessageAttributeBinary c val          (x, _) -> throwM . XmlException-            $ "unkown data type for MessageAttributeValue: " <> T.unpack x+            $ "unknown data type for MessageAttributeValue: " <> T.unpack x   where     parseType s = case T.break (== '.') s of         (a, "") -> (a, Nothing)@@ -519,7 +519,7 @@ readMessage cursor = do     mid <- force "Missing Message Id"         $ cursor $// Cu.laxElement "MessageId" &/ Cu.content-    rh <- force "Missing Reciept Handle"+    rh <- force "Missing Receipt Handle"         $ cursor $// Cu.laxElement "ReceiptHandle" &/ Cu.content     md5 <- force "Missing MD5 Signature"         $ cursor $// Cu.laxElement "MD5OfBody" &/ Cu.content
CHANGELOG.md view
@@ -1,3 +1,16 @@+0.25 series+-----------++NOTES: 0.25 brings technically breaking changes, which should not affect+most users. I recommend using smart constructors and {} matching syntax+whenever possible when interacting with aws types.++-   0.25+    - [breaking change] Added poTagging constructor to PutObject+    - Switch from no longer maintained cryptonite to crypton.+    - Removed support for building with network-2.x, and removed the+      NetworkBSD build flag.+ 0.24 series ----------- @@ -299,7 +312,7 @@         \#72, \#74)     -   SES: SendRawEmail now correctly encodes destinations and allows         multiple destinations (\#73)-    -   EC2: support fo Instance metadata (\#37)+    -   EC2: support for Instance metadata (\#37)     -   Core: queryToHttpRequest allows overriding "Date" for the         benefit of Chris Dornan's Elastic Transcoder bindings (\#77) 
Examples/Sqs.hs view
@@ -90,7 +90,7 @@   -}   exceptT T.putStrLn T.putStrLn . retryT 4 $ do     qUrls <- liftIO $ do-      putStrLn $ "Listing all queueus to check to see if " ++ show (Sqs.qName sqsQName) ++ " is gone"+      putStrLn $ "Listing all queues to check to see if " ++ show (Sqs.qName sqsQName) ++ " is gone"       Sqs.ListQueuesResponse qUrls_ <- Aws.simpleAws cfg sqscfg $ Sqs.ListQueues Nothing       mapM_ T.putStrLn qUrls_       return qUrls_
aws.cabal view
@@ -1,5 +1,5 @@ Name:                aws-Version:             0.24.4+Version:             0.25 Synopsis:            Amazon Web Services (AWS) for Haskell Description:         Bindings for Amazon Web Services (AWS), with the aim of supporting all AWS services. To see a high level overview of the library, see the README at <https://github.com/aristidb/aws/blob/master/README.md>. Homepage:            http://github.com/aristidb/aws@@ -19,7 +19,7 @@ Source-repository this   type: git   location: https://github.com/aristidb/aws.git-  tag: 0.24+  tag: 0.25  Source-repository head   type: git@@ -29,10 +29,6 @@   Description: Build the examples.   Default: False -Flag NetworkBSD-  Description: Build with network-3.0 which split out network-bsd-  Default: True- Library   Exposed-modules:                        Aws@@ -143,7 +139,7 @@                        conduit              >= 1.3     && < 1.4,                        conduit-extra        >= 1.3     && < 1.4,                        containers           >= 0.4,-                       cryptonite           >= 0.11,+                       crypton              >= 0.34,                        data-default         >= 0.5.3   && < 0.9,                        directory            >= 1.0     && < 2.0,                        filepath             >= 1.1     && < 1.6,@@ -166,17 +162,9 @@                        unordered-containers >= 0.2,                        utf8-string          >= 0.3     && < 1.1,                        vector               >= 0.10,-                       xml-conduit          >= 1.8     && <2.0-  if flag(NetworkBSD)-    Build-depends: network == 3.*, network-bsd == 2.8.*-  else-    Build-depends: network == 2.*- -  if !impl(ghc >= 7.6)-    Build-depends: ghc-prim--  if !impl(ghc >= 8.0)-    Build-depends: semigroups == 0.18.*+                       xml-conduit          >= 1.8     && <2.0,+                       network              == 3.*,+                       network-bsd          == 2.8.*    GHC-Options: -Wall 
tests/DynamoDb/Utils.hs view
@@ -119,7 +119,7 @@ withTable = withTable_ True  withTable_-    :: Bool -- ^ whether to prefix te table name+    :: Bool -- ^ whether to prefix the table name     -> T.Text -- ^ table Name     -> Int -- ^ read capacity (#(non-consistent) reads * itemsize/4KB)     -> Int -- ^ write capacity (#writes * itemsize/1KB)
tests/S3/Main.hs view
@@ -88,7 +88,7 @@     , "By running the tests in this test-suite costs for usage of AWS"     , "services may incur."     , ""-    , "In order to actually excute the tests in this test-suite you must"+    , "In order to actually execute the tests in this test-suite you must"     , "provide the command line options:"     , ""     , "    --run-with-aws-credentials"
tests/Sqs/Main.hs view
@@ -84,7 +84,7 @@     , "By running the tests in this test-suite costs for usage of AWS"     , "services may incur."     , ""-    , "In order to actually excute the tests in this test-suite you must"+    , "In order to actually execute the tests in this test-suite you must"     , "provide the command line options:"     , ""     , "    --run-with-aws-credentials"@@ -298,7 +298,7 @@ -- | Checks that long polling is actually enabled. We add a delay to the messages -- and immediately make a receive request with a polling wait time that is larger -- than the delay. Note that even though polling forces consistent reads, messages--- will become available with some (small) offset. Therefor we request only a single+-- will become available with some (small) offset. Therefore we request only a single -- message at a time. -- prop_sendReceiveDeleteMessageLongPolling1