Copyright | (c) 2013-2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Credentials.DynamoDB.Item
Description
This module contains the schema that is used by Credentials.DynamoDB to serialise encryption parameters to DynamoDB items.
- padding :: Text
- newtype Version = Version Integer
- equals :: Item a => a -> HashMap Text Condition
- nameField :: Text
- revisionField :: Text
- versionField :: Text
- wrappedKeyField :: Text
- ciphertextField :: Text
- digestField :: Text
- class Item a where
- toItem :: a -> HashMap Text AttributeValue
- parseItem :: HashMap Text AttributeValue -> Either CredentialError a
- fromItem :: (MonadThrow m, Item a) => HashMap Text AttributeValue -> m a
- parse :: Attribute a => Text -> HashMap Text AttributeValue -> Either CredentialError a
- class Attribute a where
Documentation
The DynamoDB field used for optimistic locking.
Serialisation of Version
handles left-padding to support
consistent lexicographic ordering when used as a range in DynamoDB.
revisionField :: Text Source
versionField :: Text Source
wrappedKeyField :: Text Source
ciphertextField :: Text Source
digestField :: Text Source
fromItem :: (MonadThrow m, Item a) => HashMap Text AttributeValue -> m a Source
Decode an item by throwing a CredentialError
exception when an
error is encountered.
parse :: Attribute a => Text -> HashMap Text AttributeValue -> Either CredentialError a Source