packages feed

antiope-dynamodb (empty) → 1.0.0

raw patch · 8 files changed

+144/−0 lines, 8 filesdep +amazonkadep +amazonka-coredep +amazonka-dynamodbsetup-changed

Dependencies added: amazonka, amazonka-core, amazonka-dynamodb, antiope-dynamodb, base, generic-lens, lens, text, unordered-containers

Files

+ ChangeLog.md view
@@ -0,0 +1,3 @@+# Changelog for antiope-dynamodb++## Unreleased changes
+ LICENSE view
@@ -0,0 +1,30 @@+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:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * 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.++    * 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.++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.
+ README.md view
@@ -0,0 +1,1 @@+# antiope-dynamodb
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ antiope-dynamodb.cabal view
@@ -0,0 +1,69 @@+-- This file has been generated from package.yaml by hpack version 0.20.0.+--+-- see: https://github.com/sol/hpack+--+-- hash: f1e6559c39644e3680e089339e947b6df94373115be8c519fe1010be15c5f6b6++name:           antiope-dynamodb+version:        1.0.0+description:    Please see the README on Github at <https://github.com/arbor/antiope#readme>+category:       Services+homepage:       https://github.com/arbor/antiope#readme+bug-reports:    https://github.com/arbor/antiope/issues+author:         Tyler Durden+maintainer:     mayhem@arbor.net+copyright:      Arbor Networks+license:        MIT+license-file:   LICENSE+build-type:     Simple+cabal-version:  >= 1.10++extra-source-files:+    ChangeLog.md+    README.md++source-repository head+  type: git+  location: https://github.com/arbor/antiope++library+  hs-source-dirs:+      src+  default-extensions: BangPatterns GeneralizedNewtypeDeriving OverloadedStrings TupleSections+  ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -msse4.2+  build-depends:+      amazonka+    , amazonka-core+    , amazonka-dynamodb+    , base >=4.7 && <5+    , generic-lens+    , lens+    , text+    , unordered-containers+  exposed-modules:+      Antiope.DynamoDB+      Antiope.DynamoDB.Types+  other-modules:+      Paths_antiope_dynamodb+  default-language: Haskell2010++test-suite antiope-dynamodb-test+  type: exitcode-stdio-1.0+  main-is: Spec.hs+  hs-source-dirs:+      test+  default-extensions: BangPatterns GeneralizedNewtypeDeriving OverloadedStrings TupleSections+  ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -msse4.2 -threaded -rtsopts -with-rtsopts=-N+  build-depends:+      amazonka+    , amazonka-core+    , amazonka-dynamodb+    , antiope-dynamodb+    , base >=4.7 && <5+    , generic-lens+    , lens+    , text+    , unordered-containers+  other-modules:+      Paths_antiope_dynamodb+  default-language: Haskell2010
+ src/Antiope/DynamoDB.hs view
@@ -0,0 +1,25 @@+{-# LANGUAGE ScopedTypeVariables #-}++module Antiope.DynamoDB+( MonadAWS+, FromText(..), fromText+, ToText(..)+, TableName(..)+, dynamoPutItem+, dynamoQuery+, module Network.AWS.DynamoDB+) where++import Antiope.DynamoDB.Types (TableName (TableName))+import Control.Lens+import Data.HashMap.Strict    (HashMap)+import Data.Text              (Text)+import Network.AWS            (MonadAWS, send)+import Network.AWS.Data.Text  (FromText (..), ToText (..), fromText, toText)+import Network.AWS.DynamoDB++dynamoPutItem :: MonadAWS m => TableName -> HashMap Text AttributeValue -> m PutItemResponse+dynamoPutItem table item = send $ putItem (table & toText) & piItem .~ item++dynamoQuery :: MonadAWS m => TableName -> (Query -> Query) -> m QueryResponse+dynamoQuery table f = send $ f $ query (table & toText)
+ src/Antiope/DynamoDB/Types.hs view
@@ -0,0 +1,12 @@+{-# LANGUAGE DeriveGeneric #-}++module Antiope.DynamoDB.Types where++import Data.String           (IsString)+import Data.Text             (Text)+import GHC.Generics+import Network.AWS.Data.Text (FromText (..), ToText (..))++newtype TableName = TableName Text+  deriving (Eq, Show, IsString, ToText, FromText, Generic)+
+ test/Spec.hs view
@@ -0,0 +1,2 @@+main :: IO ()+main = putStrLn "Test suite not yet implemented"