blob: 7a461c7592ebbd2b528293d8aa7f8f169f74a346 (
plain)
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
34
35
36
|
{- Copyright 2016 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE OverloadedStrings #-}
module Storage.Network (networkServers, networkStorage) where
import Types
import Types.Storage
networkServers :: IO StorageLocations
networkServers = return $ StorageLocations [] -- none yet
networkStorage :: Storage
networkStorage = Storage
{ storeShard = store
, retrieveShard = retrieve
, obscureShards = obscure
, countShards = count
}
store :: StorableObjectIdent -> Shard -> IO StoreResult
store _i _s = return $ StoreFailure "network storage not implemented yet"
retrieve :: ShardNum -> StorableObjectIdent -> IO RetrieveResult
retrieve _n _i = return $ RetrieveFailure "network storage not implemented yet"
-- | Servers should automatically obscure, so do nothing.
-- (Could upload chaff.)
obscure :: IO ObscureResult
obscure = return ObscureSuccess
count :: IO CountResult
count = return $ CountFailure "network storage not implemented yet"
|