summaryrefslogtreecommitdiffhomepage
path: root/Storage.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-11 20:51:49 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-11 20:51:49 -0400
commit73d1b3d2dfb0f225132ab31a701e6378422e2a37 (patch)
tree96f98e948fa2f872539553b8e137d02b6efff29c /Storage.hs
parenta3834e558cf6ae04826b44e65a02ee22286f7952 (diff)
downloadkeysafe-73d1b3d2dfb0f225132ab31a701e6378422e2a37.tar.gz
add shardCount
Diffstat (limited to 'Storage.hs')
-rw-r--r--Storage.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Storage.hs b/Storage.hs
index fc9e9ed..cb0e323 100644
--- a/Storage.hs
+++ b/Storage.hs
@@ -13,7 +13,8 @@ data Storage = Storage
, obscureShards :: IO ObscureResult
-- ^ run after making some calls to storeShard/retrieveShard,
-- to avoid correlation attacks
- }
+ , countShards :: IO CountResult
+ } -- Note that there is no interface to enumerate shards.
data StoreResult = StoreSuccess | StoreFailure String
deriving (Show)
@@ -22,3 +23,6 @@ data RetrieveResult = RetrieveSuccess Shard | RetrieveFailure String
data ObscureResult = ObscureSuccess | ObscureFailure String
deriving (Show)
+
+data CountResult = CountResult Integer | CountFailure String
+ deriving (Show)