module Network.TableStorage.Types where
import Data.Time
import Network.HTTP.Base
type AccountKey = String
type Signature = String
type AuthHeader = String
data Account = Account { accountScheme :: String,
accountHost :: String,
accountPort :: Int,
accountKey :: AccountKey,
accountName :: String,
accountResourcePrefix :: String } deriving Show
data SharedKeyAuth = SharedKeyAuth { sharedKeyAuthVerb :: RequestMethod,
sharedKeyAuthContentMD5 :: String,
sharedKeyAuthContentType :: String,
sharedKeyAuthDate :: String,
sharedKeyAuthCanonicalizedResource :: String } deriving Show
data EntityKey = EntityKey { ekPartitionKey :: String,
ekRowKey :: String } deriving Show
data EntityColumn =
EdmBinary (Maybe String) |
EdmBoolean (Maybe Bool) |
EdmDateTime (Maybe UTCTime) |
EdmDouble (Maybe Double) |
EdmGuid (Maybe String) |
EdmInt32 (Maybe Int) |
EdmInt64 (Maybe Int) |
EdmString (Maybe String)
deriving Show
data Entity = Entity { entityKey :: EntityKey,
entityColumns :: [(String, EntityColumn)] } deriving Show
data EntityQuery = EntityQuery { eqPageSize :: Maybe Int,
eqFilter :: Maybe EntityFilter } deriving Show
data ComparisonType =
Equal |
GreaterThan |
GreaterThanOrEqual |
LessThan |
LessThanOrEqual |
NotEqual
deriving Show
data EntityFilter =
And [EntityFilter] |
Or [EntityFilter] |
Not EntityFilter |
CompareBoolean String Bool |
CompareDateTime String ComparisonType UTCTime |
CompareDouble String ComparisonType Double |
CompareGuid String String |
CompareInt32 String ComparisonType Integer |
CompareInt64 String ComparisonType Integer |
CompareString String ComparisonType String
deriving Show