credentials-0.0.1.1: Secure Credentials Storage and Distribution

Copyright(c) 2013-2015-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Credentials.DynamoDB.Item

Description

This module contains the schema that is used by Credentials.DynamoDB to serialise encryption parameters to DynamoDB items.

Synopsis

Documentation

padding :: Text Source

newtype Version Source

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.

Constructors

Version Integer 

equals :: Item a => a -> HashMap Text Condition Source

class Item a where Source

Methods

toItem :: a -> HashMap Text AttributeValue Source

Encode an item as a set of attributes including their schema.

parseItem :: HashMap Text AttributeValue -> Either CredentialError a Source

Decode an item from a set of attributes.

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

class Attribute a where Source

Methods

toAttr :: a -> AttributeValue Source

Encode an attribute value.

parseAttr :: AttributeValue -> Maybe a Source

Decode an attribute value.