summaryrefslogtreecommitdiffhomepage
path: root/Storage/Network.hs
blob: 06b7545b0fe08c06d8faf9b4ee7b92754baf2a65 (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
{- Copyright 2016 Joey Hess <id@joeyh.name>
 -
 - Licensed under the GNU AGPL version 3 or higher.
 -}

{-# LANGUAGE OverloadedStrings #-}

module Storage.Network (networkStorage) where

import Types
import Storage

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"