summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2020-07-20 14:06:05 -0400
committerJoey Hess <joeyh@joeyh.name>2020-07-20 14:06:05 -0400
commitc4cc2cdf4cec25c4e42c8f6e0ab901e32df8fc09 (patch)
tree1b43923a2af4b2f8e0132c4487e85516563cc313 /Backend
parentd1300eca2e9f77c9a79d310b554b89e99052237f (diff)
rename getKey to genKey
for consistency with external backend protocol
Diffstat (limited to 'Backend')
-rw-r--r--Backend/Hash.hs8
-rw-r--r--Backend/URL.hs2
-rw-r--r--Backend/WORM.hs2
3 files changed, 6 insertions, 6 deletions
diff --git a/Backend/Hash.hs b/Backend/Hash.hs
index d6714c703b..2b8bcd78d3 100644
--- a/Backend/Hash.hs
+++ b/Backend/Hash.hs
@@ -74,7 +74,7 @@ backends = concatMap (\h -> [genBackendE h, genBackend h]) hashes
genBackend :: Hash -> Backend
genBackend hash = Backend
{ backendVariety = hashKeyVariety hash (HasExt False)
- , getKey = Just (keyValue hash)
+ , genKey = Just (keyValue hash)
, verifyKeyContent = Just $ checkKeyChecksum hash
, canUpgradeKey = Just needsUpgrade
, fastMigrate = Just trivialMigrate
@@ -85,7 +85,7 @@ genBackend hash = Backend
genBackendE :: Hash -> Backend
genBackendE hash = (genBackend hash)
{ backendVariety = hashKeyVariety hash (HasExt True)
- , getKey = Just (keyValueE hash)
+ , genKey = Just (keyValueE hash)
}
hashKeyVariety :: Hash -> HasExt -> KeyVariety
@@ -308,10 +308,10 @@ md5Hasher = show . md5
testKeyBackend :: Backend
testKeyBackend =
let b = genBackendE (SHA2Hash (HashSize 256))
- gk = case getKey b of
+ gk = case genKey b of
Nothing -> Nothing
Just f -> Just (\ks p -> addE <$> f ks p)
- in b { getKey = gk }
+ in b { genKey = gk }
where
addE k = alterKey k $ \d -> d
{ keyName = keyName d <> longext
diff --git a/Backend/URL.hs b/Backend/URL.hs
index 2d0b7bc923..5c8235760a 100644
--- a/Backend/URL.hs
+++ b/Backend/URL.hs
@@ -21,7 +21,7 @@ backends = [backend]
backend :: Backend
backend = Backend
{ backendVariety = URLKey
- , getKey = Nothing
+ , genKey = Nothing
, verifyKeyContent = Nothing
, canUpgradeKey = Nothing
, fastMigrate = Nothing
diff --git a/Backend/WORM.hs b/Backend/WORM.hs
index e2b38efb55..bf7dc7bf63 100644
--- a/Backend/WORM.hs
+++ b/Backend/WORM.hs
@@ -24,7 +24,7 @@ backends = [backend]
backend :: Backend
backend = Backend
{ backendVariety = WORMKey
- , getKey = Just keyValue
+ , genKey = Just keyValue
, verifyKeyContent = Nothing
, canUpgradeKey = Just needsUpgrade
, fastMigrate = Just removeProblemChars