summaryrefslogtreecommitdiffhomepage
path: root/Storage.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Storage.hs')
-rw-r--r--Storage.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/Storage.hs b/Storage.hs
new file mode 100644
index 0000000..3e5707f
--- /dev/null
+++ b/Storage.hs
@@ -0,0 +1,17 @@
+{- Copyright 2016 Joey Hess <id@joeyh.name>
+ -
+ - Licensed under the GNU AGPL version 3 or higher.
+ -}
+
+module Storage where
+
+import Types
+
+data Storage = Storage
+ { storeShard :: StorableObjectIdent -> Shard -> IO StoreResult
+ , retrieveShard :: ShardNum -> StorableObjectIdent -> IO RetrieveResult
+ }
+
+data StoreResult = StoreSuccess | StoreFailure String
+
+data RetrieveResult = RetrieveSuccess Shard | RetrieveFailure String