diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-19 13:00:34 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-19 13:00:34 -0400 |
commit | 6261f7e58b764ae48293bee3b1863b518e9f0442 (patch) | |
tree | d9260d1beeced137e36c1ae1945c499d85e91608 /Types | |
parent | d3323ab8e9e39bcb0a6493d33efa265073920a7d (diff) | |
download | keysafe-6261f7e58b764ae48293bee3b1863b518e9f0442.tar.gz |
rename shard -> share
This makes it clearer that it's not a chunk of data, but a Shamir share.
Diffstat (limited to 'Types')
-rw-r--r-- | Types/Storage.hs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Types/Storage.hs b/Types/Storage.hs index b3f714a..01ae0ad 100644 --- a/Types/Storage.hs +++ b/Types/Storage.hs @@ -9,7 +9,7 @@ module Types.Storage where import Types --- | All known locations where shards can be stored, ordered with +-- | All known locations where shares can be stored, ordered with -- preferred locations first. newtype StorageLocations = StorageLocations [Storage] deriving (Monoid) @@ -17,23 +17,23 @@ newtype StorageLocations = StorageLocations [Storage] -- | Storage interface. This can be used both for local storage, -- an upload queue, or a remote server. -- --- Note that there is no interface to enumerate shards. +-- Note that there is no interface to enumerate shares. -- This is intentional; servers should not allow that. data Storage = Storage - { storeShard :: StorableObjectIdent -> Shard -> IO StoreResult - , retrieveShard :: ShardNum -> StorableObjectIdent -> IO RetrieveResult - , obscureShards :: IO ObscureResult - -- ^ Run after making some calls to storeShard/retrieveShard, + { storeShare :: StorableObjectIdent -> Share -> IO StoreResult + , retrieveShare :: ShareNum -> StorableObjectIdent -> IO RetrieveResult + , obscureShares :: IO ObscureResult + -- ^ Run after making some calls to storeShare/retrieveShare, -- to avoid correlation attacks. - , countShards :: IO CountResult - , moveShards :: Storage -> IO () - -- ^ Tries to move all shards from this storage to another one. + , countShares :: IO CountResult + , moveShares :: Storage -> IO () + -- ^ Tries to move all shares from this storage to another one. } data StoreResult = StoreSuccess | StoreAlreadyExists | StoreFailure String deriving (Show) -data RetrieveResult = RetrieveSuccess Shard | RetrieveFailure String +data RetrieveResult = RetrieveSuccess Share | RetrieveFailure String data ObscureResult = ObscureSuccess | ObscureFailure String deriving (Show) |