-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Azure Table Storage REST API Wrapper -- -- A collection of functions to call the methods of the Azure Table -- Storage REST API from Haskell. Table and entity level functions are -- supported along with shared key authentication token generation, and -- error handling. Pagination and projections are currently not -- supported. @package tablestorage @version 0.2.1.0 -- | Data types used to construct the various web method requests. module Network.TableStorage.Types -- | The Base-64 encoded account secret key newtype AccountKey AccountKey :: String -> AccountKey unAccountKey :: AccountKey -> String -- | The type of authorization header signatures newtype Signature Signature :: String -> Signature unSignature :: Signature -> String -- | The type of authorization headers newtype AuthHeader AuthHeader :: String -> AuthHeader unAuthHeader :: AuthHeader -> String -- | Account information: host, port, secret key and account name data Account Account :: String -> String -> Int -> AccountKey -> String -> String -> Account accountScheme :: Account -> String accountHost :: Account -> String accountPort :: Account -> Int accountKey :: Account -> AccountKey accountName :: Account -> String accountResourcePrefix :: Account -> String -- | The unencrypted content of the Shared Key authorization header data SharedKeyAuth SharedKeyAuth :: Method -> String -> String -> String -> String -> SharedKeyAuth sharedKeyAuthVerb :: SharedKeyAuth -> Method sharedKeyAuthContentMD5 :: SharedKeyAuth -> String sharedKeyAuthContentType :: SharedKeyAuth -> String sharedKeyAuthDate :: SharedKeyAuth -> String sharedKeyAuthCanonicalizedResource :: SharedKeyAuth -> String -- | Uniquely identifies an entity in a table : a partition key and row key -- pair. data EntityKey EntityKey :: String -> String -> EntityKey ekPartitionKey :: EntityKey -> String ekRowKey :: EntityKey -> String -- | Represents a column in an entity. -- -- The constructor used indicates the data type of the column -- represented. -- -- For certain operations, the type must match the type of data stored in -- the table. data EntityColumn EdmBinary :: (Maybe String) -> EntityColumn EdmBoolean :: (Maybe Bool) -> EntityColumn EdmDateTime :: (Maybe UTCTime) -> EntityColumn EdmDouble :: (Maybe Double) -> EntityColumn EdmGuid :: (Maybe String) -> EntityColumn EdmInt32 :: (Maybe Int) -> EntityColumn EdmInt64 :: (Maybe Int) -> EntityColumn EdmString :: (Maybe String) -> EntityColumn -- | An entity consists of a key and zero or more additional columns. data Entity Entity :: EntityKey -> [(String, EntityColumn)] -> Entity entityKey :: Entity -> EntityKey entityColumns :: Entity -> [(String, EntityColumn)] -- | An entity query consists of an optional filter and an optional number -- of entities to return. -- -- Projections are not currently supported. data EntityQuery EntityQuery :: Maybe Int -> Maybe EntityFilter -> EntityQuery eqPageSize :: EntityQuery -> Maybe Int eqFilter :: EntityQuery -> Maybe EntityFilter -- | The various comparisons supported in entity queries. data ComparisonType Equal :: ComparisonType GreaterThan :: ComparisonType GreaterThanOrEqual :: ComparisonType LessThan :: ComparisonType LessThanOrEqual :: ComparisonType NotEqual :: ComparisonType -- | The data type of entity filters data EntityFilter And :: [EntityFilter] -> EntityFilter Or :: [EntityFilter] -> EntityFilter Not :: EntityFilter -> EntityFilter CompareBoolean :: String -> Bool -> EntityFilter CompareDateTime :: String -> ComparisonType -> UTCTime -> EntityFilter CompareDouble :: String -> ComparisonType -> Double -> EntityFilter CompareGuid :: String -> String -> EntityFilter CompareInt32 :: String -> ComparisonType -> Integer -> EntityFilter CompareInt64 :: String -> ComparisonType -> Integer -> EntityFilter CompareString :: String -> ComparisonType -> String -> EntityFilter -- | Exception handling type. data QueryResponse QueryResponse :: Status -> String -> QueryResponse -- | Monad stack and return type of operations on azure tables type TableStorage = ErrorT TableError (ReaderT TableConf IO) -- | TableStorage configuration data data TableConf TableConf :: Account -> Maybe Manager -> Maybe Proxy -> TableConf tableAccount :: TableConf -> Account httpManager :: TableConf -> Maybe Manager httpProxy :: TableConf -> Maybe Proxy -- | Error type data TableError TableParseError :: TableError TableUnknownError :: TableError TableOtherError :: String -> TableError instance Show AccountKey instance Eq AccountKey instance Show Signature instance Eq Signature instance Show AuthHeader instance Eq AuthHeader instance Show Account instance Eq Account instance Show SharedKeyAuth instance Eq SharedKeyAuth instance Show EntityKey instance Eq EntityKey instance Show EntityColumn instance Eq EntityColumn instance Show Entity instance Show ComparisonType instance Eq ComparisonType instance Show EntityFilter instance Eq EntityFilter instance Show EntityQuery instance Eq EntityQuery instance Show TableError instance Error TableError -- | This module contains constants for working with the storage emulator. module Network.TableStorage.Development -- | An account for the storage emulator developmentAccount :: Account developmentConf :: TableConf -- | This module contains functions which help when unmarshalling query -- responses module Network.TableStorage.Query -- | Find the value in a binary-valued column or return Nothing if no such -- column exists edmBinary :: String -> Entity -> Maybe String -- | Find the value in a boolean-valued column or return Nothing if no such -- column exists edmBoolean :: String -> Entity -> Maybe Bool -- | Find the value in a date-valued column or return Nothing if no such -- column exists edmDateTime :: String -> Entity -> Maybe UTCTime -- | Find the value in a double-valued column or return Nothing if no such -- column exists edmDouble :: String -> Entity -> Maybe Double -- | Find the value in a Guid-valued column or return Nothing if no such -- column exists edmGuid :: String -> Entity -> Maybe String -- | Find the value in an integer-valued column or return Nothing if no -- such column exists edmInt32 :: String -> Entity -> Maybe Int -- | Find the value in an integer-valued column or return Nothing if no -- such column exists edmInt64 :: String -> Entity -> Maybe Int -- | Find the value in a string-valued column or return Nothing if no such -- column exists edmString :: String -> Entity -> Maybe String -- | This module provides functions to create authenticated requests to the -- Table Storage REST API. -- -- Functions are provided to create Shared Key authorization tokens, and -- to add the required headers for the various requests. module Network.TableStorage.Auth -- | Creates and executes an authenticated request including the -- Authorization header. -- -- The function takes the account information, request method, additional -- headers, resource, canonicalized resource and request body as -- parameters, and returns an error message or the response object. authenticatedRequest :: Method -> [Header] -> String -> String -> String -> TableStorage QueryResponse -- | This module provides functions wrapping the Azure REST API web -- methods. module Network.TableStorage.API -- | Runs TableStorage actions given a configuration withTableStorage :: TableConf -> TableStorage a -> IO (Either TableError a) -- | List the names of tables for an account or returns an error message queryTables :: TableStorage [String] -- | Creates a new table with the specified name or returns an error -- message createTable :: String -> TableStorage () -- | Creates a new table with the specified name if it does not already -- exist, or returns an erro message createTableIfNecessary :: String -> TableStorage () -- | Deletes the table with the specified name or returns an error message deleteTable :: String -> TableStorage () -- | Inserts an entity into the table with the specified name or returns an -- error message insertEntity :: String -> Entity -> TableStorage () -- | Updates the specified entity (possibly removing columns) or returns an -- error message updateEntity :: String -> Entity -> TableStorage () -- | Merges the specified entity (without removing columns) or returns an -- error message mergeEntity :: String -> Entity -> TableStorage () -- | Deletes the entity with the specified key or returns an error message deleteEntity :: String -> EntityKey -> TableStorage () -- | Returns the entity with the specified table name and key or an error -- message queryEntity :: String -> EntityKey -> TableStorage Entity -- | Returns a collection of entities by executing the specified query or -- returns an error message queryEntities :: String -> EntityQuery -> TableStorage [Entity] -- | An empty query with no filters and no specified page size defaultEntityQuery :: EntityQuery -- | Constructs an Account with the default values for Port and Resource -- Prefix defaultAccount :: AccountKey -> String -> String -> Account defaultConf :: AccountKey -> String -> String -> TableConf -- | A simple wrapper for the Azure Table Storage REST API -- -- This module exists simply to re-export the following: -- --
module Network.TableStorage