diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-10 18:05:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-10 18:05:37 -0400 |
commit | e5514e0cb0809848645814e8c1f67cd89cb16c4f (patch) | |
tree | 7041c952f9fa00fc60a40fa8e88fa1cd54818706 /Types.hs | |
parent | dce9c2e0804d2c94f46dcac8c9884766bb22dcc7 (diff) |
update
Diffstat (limited to 'Types.hs')
-rw-r--r-- | Types.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Types.hs b/Types.hs new file mode 100644 index 000000000..2308b6fde --- /dev/null +++ b/Types.hs @@ -0,0 +1,24 @@ +{- git-annex data types + - -} + +module Types where + +type Key = String + +data Backend = Backend { + -- name of this backend + name :: String, + -- converts a filename to a key + getKey :: GitRepo -> FilePath -> IO (Maybe Key), + -- stores a file's contents to a key + storeFileKey :: GitRepo -> FilePath -> Key -> IO (Bool), + -- retrieves a key's contents to a file + retrieveKeyFile :: IO Key -> FilePath -> IO (Bool) +} + +data GitRepo = GitRepo { + top :: FilePath, + remotes :: [GitRepo], + backends :: [Backend] +} + |