rename backends more
This commit is contained in:
parent
e67887d98b
commit
5de102d5b9
4 changed files with 14 additions and 14 deletions
|
@ -1,17 +1,17 @@
|
||||||
{- git-annex "checksum" backend
|
{- git-annex "SHA1" backend
|
||||||
- -}
|
- -}
|
||||||
|
|
||||||
module Backend.Checksum (backend) where
|
module Backend.SHA1 (backend) where
|
||||||
|
|
||||||
import qualified Backend.File
|
import qualified Backend.File
|
||||||
import Data.Digest.Pure.SHA
|
import Data.Digest.Pure.SHA
|
||||||
import BackendTypes
|
import BackendTypes
|
||||||
|
|
||||||
backend = Backend.File.backend {
|
backend = Backend.File.backend {
|
||||||
name = "checksum",
|
name = "SHA1",
|
||||||
getKey = keyValue
|
getKey = keyValue
|
||||||
}
|
}
|
||||||
|
|
||||||
-- checksum the file to get its key
|
-- checksum the file to get its key
|
||||||
keyValue :: FilePath -> Annex (Maybe Key)
|
keyValue :: FilePath -> Annex (Maybe Key)
|
||||||
keyValue k = error "checksum keyValue unimplemented" -- TODO
|
keyValue k = error "SHA1 keyValue unimplemented" -- TODO
|
|
@ -1,7 +1,7 @@
|
||||||
{- git-annex "url" backend
|
{- git-annex "URL" backend
|
||||||
- -}
|
- -}
|
||||||
|
|
||||||
module Backend.Url (backend) where
|
module Backend.URL (backend) where
|
||||||
|
|
||||||
import Control.Monad.State (liftIO)
|
import Control.Monad.State (liftIO)
|
||||||
import Data.String.Utils
|
import Data.String.Utils
|
||||||
|
@ -10,7 +10,7 @@ import System.Exit
|
||||||
import BackendTypes
|
import BackendTypes
|
||||||
|
|
||||||
backend = Backend {
|
backend = Backend {
|
||||||
name = "url",
|
name = "URL",
|
||||||
getKey = keyValue,
|
getKey = keyValue,
|
||||||
storeFileKey = dummyStore,
|
storeFileKey = dummyStore,
|
||||||
retrieveKeyFile = downloadUrl,
|
retrieveKeyFile = downloadUrl,
|
|
@ -1,7 +1,7 @@
|
||||||
{- git-annex "WORM" backend -- Write Once, Read Many
|
{- git-annex "WORM" backend -- Write Once, Read Many
|
||||||
- -}
|
- -}
|
||||||
|
|
||||||
module Backend.Worm (backend) where
|
module Backend.WORM (backend) where
|
||||||
|
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import qualified Backend.File
|
import qualified Backend.File
|
|
@ -10,13 +10,13 @@ module BackendList (
|
||||||
import BackendTypes
|
import BackendTypes
|
||||||
|
|
||||||
-- When adding a new backend, import it here and add it to the list.
|
-- When adding a new backend, import it here and add it to the list.
|
||||||
import qualified Backend.Worm
|
import qualified Backend.WORM
|
||||||
import qualified Backend.Checksum
|
import qualified Backend.SHA1
|
||||||
import qualified Backend.Url
|
import qualified Backend.URL
|
||||||
supportedBackends =
|
supportedBackends =
|
||||||
[ Backend.Worm.backend
|
[ Backend.WORM.backend
|
||||||
, Backend.Checksum.backend
|
, Backend.SHA1.backend
|
||||||
, Backend.Url.backend
|
, Backend.URL.backend
|
||||||
]
|
]
|
||||||
|
|
||||||
{- Parses a string with a list of backend names into
|
{- Parses a string with a list of backend names into
|
||||||
|
|
Loading…
Add table
Reference in a new issue