add DnsSec privdata types

This commit is contained in:
Joey Hess 2015-01-03 19:08:32 -04:00
parent 932cb7c5d6
commit 05004730c7
1 changed files with 11 additions and 4 deletions

View File

@ -2,18 +2,19 @@ module Propellor.Types.PrivData where
import Propellor.Types.OS
-- | Note that removing or changing field names will break the
-- | Note that removing or changing constructors will break the
-- serialized privdata files, so don't do that!
-- It's fine to add new fields.
-- It's fine to add new constructors.
data PrivDataField
= DockerAuthentication
| SshPubKey SshKeyType UserName
| SshPubKey SshKeyType UserName -- ^ For host key, use empty UserName
| SshPrivKey SshKeyType UserName
| SshAuthorizedKeys UserName
| Password UserName
| CryptPassword UserName
| PrivFile FilePath
| GpgKey
| DnsSec DnsSecKey
deriving (Read, Show, Ord, Eq)
-- | Combines a PrivDataField with a description of how to generate
@ -49,7 +50,7 @@ instance IsPrivDataSource PrivDataSource where
-- for the web server serving that domain. Multiple hosts might
-- use that privdata.
--
-- This appears in serlialized privdata files.
-- This appears in serialized privdata files.
newtype Context = Context String
deriving (Read, Show, Ord, Eq)
@ -98,3 +99,9 @@ sshKeyTypeParam SshDsa = "DSA"
sshKeyTypeParam SshEcdsa = "ECDSA"
sshKeyTypeParam SshEd25519 = "ED25519"
data DnsSecKey
= PubZSK -- ^ DNSSEC Zone Signing Key (public)
| PrivZSK -- ^ DNSSEC Zone Signing Key (private)
| PubKSK -- ^ DNSSEC Key Signing Key (public)
| PrivKSK -- ^ DNSSEC Key Signing Key (private)
deriving (Read, Show, Ord, Eq)