This commit is contained in:
Joey Hess 2010-10-10 18:05:37 -04:00
parent dce9c2e080
commit e5514e0cb0
12 changed files with 101 additions and 36 deletions

24
Types.hs Normal file
View file

@ -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]
}