Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data PrivDataField
- data PrivDataSource
- type PrivDataSourceDesc = String
- class IsPrivDataSource s where
- privDataField :: s -> PrivDataField
- describePrivDataSource :: s -> Maybe PrivDataSourceDesc
- newtype Context = Context String
- newtype HostContext = HostContext {
- mkHostContext :: HostName -> Context
- class IsContext c where
- asContext :: HostName -> c -> Context
- asHostContext :: c -> HostContext
- anyContext :: Context
- hostContext :: HostContext
- newtype PrivData = PrivData String
- privDataLines :: PrivData -> [String]
- privDataVal :: PrivData -> String
- privDataByteString :: PrivData -> ByteString
- data SshKeyType
- = SshRsa
- | SshDsa
- | SshEcdsa
- | SshEd25519
- sshKeyTypeParam :: SshKeyType -> String
- data DnsSecKey
Documentation
data PrivDataField Source #
Note that removing or changing constructors or changing types will break the serialized privdata files, so don't do that! It's fine to add new constructors.
DockerAuthentication | |
SshPubKey SshKeyType UserName | Not used anymore, but retained to avoid breaking serialization of old files |
SshPrivKey SshKeyType UserName | For host key, use empty UserName |
SshAuthorizedKeys UserName | |
Password UserName | |
CryptPassword UserName | |
PrivFile FilePath | |
GpgKey | |
DnsSec DnsSecKey |
Instances
Read PrivDataField Source # | |
Defined in Propellor.Types.PrivData readsPrec :: Int -> ReadS PrivDataField # readList :: ReadS [PrivDataField] # | |
Show PrivDataField Source # | |
Defined in Propellor.Types.PrivData showsPrec :: Int -> PrivDataField -> ShowS # show :: PrivDataField -> String # showList :: [PrivDataField] -> ShowS # | |
Eq PrivDataField Source # | |
Defined in Propellor.Types.PrivData (==) :: PrivDataField -> PrivDataField -> Bool # (/=) :: PrivDataField -> PrivDataField -> Bool # | |
Ord PrivDataField Source # | |
Defined in Propellor.Types.PrivData compare :: PrivDataField -> PrivDataField -> Ordering # (<) :: PrivDataField -> PrivDataField -> Bool # (<=) :: PrivDataField -> PrivDataField -> Bool # (>) :: PrivDataField -> PrivDataField -> Bool # (>=) :: PrivDataField -> PrivDataField -> Bool # max :: PrivDataField -> PrivDataField -> PrivDataField # min :: PrivDataField -> PrivDataField -> PrivDataField # | |
IsPrivDataSource PrivDataField Source # | |
data PrivDataSource Source #
Combines a PrivDataField with a description of how to generate its value.
PrivDataSourceFile PrivDataField FilePath | |
PrivDataSourceFileFromCommand PrivDataField FilePath String | |
PrivDataSource PrivDataField String |
Instances
type PrivDataSourceDesc = String Source #
class IsPrivDataSource s where Source #
privDataField :: s -> PrivDataField Source #
describePrivDataSource :: s -> Maybe PrivDataSourceDesc Source #
A context in which a PrivDataField is used.
Often this will be a domain name. For example, Context "www.example.com" could be used for the SSL cert for the web server serving that domain. Multiple hosts might use that privdata.
This appears in serialized privdata files.
newtype HostContext Source #
A context that may vary depending on the HostName where it's used.
Instances
Show HostContext Source # | |
Defined in Propellor.Types.PrivData showsPrec :: Int -> HostContext -> ShowS # show :: HostContext -> String # showList :: [HostContext] -> ShowS # | |
Eq HostContext Source # | |
Defined in Propellor.Types.PrivData (==) :: HostContext -> HostContext -> Bool # (/=) :: HostContext -> HostContext -> Bool # | |
Ord HostContext Source # | |
Defined in Propellor.Types.PrivData compare :: HostContext -> HostContext -> Ordering # (<) :: HostContext -> HostContext -> Bool # (<=) :: HostContext -> HostContext -> Bool # (>) :: HostContext -> HostContext -> Bool # (>=) :: HostContext -> HostContext -> Bool # max :: HostContext -> HostContext -> HostContext # min :: HostContext -> HostContext -> HostContext # | |
IsContext HostContext Source # | |
Defined in Propellor.Types.PrivData |
class IsContext c where Source #
Class of things that can be used as a Context.
asContext :: HostName -> c -> Context Source #
asHostContext :: c -> HostContext Source #
Instances
IsContext Context Source # | |
Defined in Propellor.Types.PrivData | |
IsContext HostContext Source # | |
Defined in Propellor.Types.PrivData |
anyContext :: Context Source #
Use when a PrivDataField is not dependent on any paricular context.
hostContext :: HostContext Source #
Makes a HostContext that consists just of the hostname.
Contains the actual private data.
Note that this may contain exta newlines at the end, or they may have been stripped off, depending on how the user entered the privdata, and which version of propellor stored it. Use the accessor functions below to avoid newline problems.
privDataLines :: PrivData -> [String] Source #
When PrivData is the content of a file, this is the lines thereof.
privDataVal :: PrivData -> String Source #
When the PrivData is a single value, like a password, this extracts it. Note that if multiple lines are present in the PrivData, only the first is returned; there is never a newline in the String.
privDataByteString :: PrivData -> ByteString Source #
Use to get ByteString out of PrivData.
data SshKeyType Source #
Instances
sshKeyTypeParam :: SshKeyType -> String Source #
Parameter that would be passed to ssh-keygen to generate key of this type
PubZSK | DNSSEC Zone Signing Key (public) |
PrivZSK | DNSSEC Zone Signing Key (private) |
PubKSK | DNSSEC Key Signing Key (public) |
PrivKSK | DNSSEC Key Signing Key (private) |
Instances
Bounded DnsSecKey Source # | |
Enum DnsSecKey Source # | |
Defined in Propellor.Types.PrivData succ :: DnsSecKey -> DnsSecKey # pred :: DnsSecKey -> DnsSecKey # fromEnum :: DnsSecKey -> Int # enumFrom :: DnsSecKey -> [DnsSecKey] # enumFromThen :: DnsSecKey -> DnsSecKey -> [DnsSecKey] # enumFromTo :: DnsSecKey -> DnsSecKey -> [DnsSecKey] # enumFromThenTo :: DnsSecKey -> DnsSecKey -> DnsSecKey -> [DnsSecKey] # | |
Read DnsSecKey Source # | |
Show DnsSecKey Source # | |
Eq DnsSecKey Source # | |
Ord DnsSecKey Source # | |
Defined in Propellor.Types.PrivData |