-- 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.1.0.2 -- | Data types used to construct the various web method requests. module Network.TableStorage.Types -- | The Base-64 encoded account secret key type AccountKey = String -- | The type of authorization header signatures type Signature = String -- | The type of authorization headers type 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 :: RequestMethod -> String -> String -> String -> String -> SharedKeyAuth sharedKeyAuthVerb :: SharedKeyAuth -> RequestMethod 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 instance Show Account instance Show SharedKeyAuth instance Show EntityKey instance Show EntityColumn instance Show Entity instance Show ComparisonType instance Show EntityFilter instance Show EntityQuery -- | This module contains constants for working with the storage emulator. module Network.TableStorage.Development -- | An account for the storage emulator developmentAccount :: Account -- | 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 string-valued column or return Nothing if no such -- column exists edmString :: 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 -- | 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 :: Account -> RequestMethod -> [Header] -> String -> String -> String -> IO (Either String Response_String) -- | This module provides functions wrapping the Azure REST API web -- methods. module Network.TableStorage.API -- | List the names of tables for an account or returns an error message queryTables :: Account -> IO (Either String [String]) -- | Creates a new table with the specified name or returns an error -- message createTable :: Account -> String -> IO (Either String ()) -- | Creates a new table with the specified name if it does not already -- exist, or returns an erro message createTableIfNecessary :: Account -> String -> IO (Either String ()) -- | Deletes the table with the specified name or returns an error message deleteTable :: Account -> String -> IO (Either String ()) -- | Inserts an entity into the table with the specified name or returns an -- error message insertEntity :: Account -> String -> Entity -> IO (Either String ()) -- | Updates the specified entity (possibly removing columns) or returns an -- error message updateEntity :: Account -> String -> Entity -> IO (Either String ()) -- | Merges the specified entity (without removing columns) or returns an -- error message mergeEntity :: Account -> String -> Entity -> IO (Either String ()) -- | Deletes the entity with the specified key or returns an error message deleteEntity :: Account -> String -> EntityKey -> IO (Either String ()) -- | Returns the entity with the specified table name and key or an error -- message queryEntity :: Account -> String -> EntityKey -> IO (Either String Entity) -- | Returns a collection of entities by executing the specified query or -- returns an error message queryEntities :: Account -> String -> EntityQuery -> IO (Either String [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 -- | A simple wrapper for the Azure Table Storage REST API -- -- This module exists simply to re-export the following: -- -- module Network.TableStorage