GnuPG options for symmetric encryption.
This commit is contained in:
parent
d529b7807f
commit
d2bc0e9f3e
12 changed files with 71 additions and 24 deletions
30
Utility/Gpg/Types.hs
Normal file
30
Utility/Gpg/Types.hs
Normal file
|
@ -0,0 +1,30 @@
|
|||
{- gpg data types
|
||||
-
|
||||
- Copyright 2013 guilhem <guilhem@fripost.org>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
module Utility.Gpg.Types where
|
||||
|
||||
import Utility.SafeCommand
|
||||
import Types.GitConfig
|
||||
import Types.Remote
|
||||
|
||||
{- GnuPG options. -}
|
||||
type GpgOpt = String
|
||||
newtype GpgOpts = GpgOpts [GpgOpt]
|
||||
|
||||
toParams :: GpgOpts -> [CommandParam]
|
||||
toParams (GpgOpts opts) = map Param opts
|
||||
|
||||
class LensGpgOpts a where
|
||||
getGpgOpts :: a -> GpgOpts
|
||||
|
||||
{- Extract the GnuPG options from a Remote Git Config. -}
|
||||
instance LensGpgOpts RemoteGitConfig where
|
||||
getGpgOpts = GpgOpts . remoteAnnexGnupgOptions
|
||||
|
||||
{- Extract the GnuPG options from a Remote. -}
|
||||
instance LensGpgOpts (RemoteA a) where
|
||||
getGpgOpts = getGpgOpts . gitconfig
|
Loading…
Add table
Add a link
Reference in a new issue