This repository has been archived by the owner on May 23, 2019. It is now read-only.
forked from ArnoVanLumig/azurify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BlobDataTypes.hs
33 lines (28 loc) · 1.84 KB
/
BlobDataTypes.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
module BlobDataTypes where
import qualified Data.ByteString as B
data AccessControl = ContainerPublic -- the container can be enumerated and all blobs can be read by anonymous users
| BlobPublic -- blobs can be read by anonymous users, but the container cannot be enumerated
| Private -- blobs can't be read by anonymous users and the container cannot be enumerated
data BlobType = PageBlob | BlockBlob deriving (Show)
data BlobSettings = BlobSettings { blobSettingsName :: B.ByteString
, blobSettingsContentType :: Maybe B.ByteString
, blobSettingsContentEncoding :: Maybe B.ByteString
, blobSettingsContentLanguage :: Maybe B.ByteString
, blobSettingsContentMD5 :: Maybe B.ByteString
, blobSettingsCacheControl :: Maybe B.ByteString
, blobSettingsType :: BlobType
, blobSettingsContentLength :: Maybe Integer -- only for page blobs, set to Nothing for block blob
, blobSettingsContents :: Maybe B.ByteString -- only for block blobs, set to Empty for page blob
}
data Blob = Blob { blobName :: B.ByteString
, blobUrl :: B.ByteString
, blobLastModified :: B.ByteString
, blobETag :: B.ByteString
, blobContentLength :: Integer
, blobContentType :: B.ByteString
, blobContentEncoding :: B.ByteString
, blobContentLanguage :: B.ByteString
, blobContentMD5 :: B.ByteString
, blobCacheControl :: B.ByteString
, blobType :: BlobType
} deriving (Show)