Safe Haskell | None |
---|---|
Language | Haskell98 |
Puppet.NativeTypes.Helpers
Description
These are the function and data types that are used to define the Puppet native types.
- module Puppet.PP
- ipaddr :: Text -> NativeTypeValidate
- nativetypemethods :: [(Text, [Text -> NativeTypeValidate])] -> NativeTypeValidate -> NativeTypeMethods
- paramname :: Text -> Doc
- rarray :: Text -> NativeTypeValidate
- string :: Text -> NativeTypeValidate
- strings :: Text -> NativeTypeValidate
- string_s :: Text -> NativeTypeValidate
- noTrailingSlash :: Text -> NativeTypeValidate
- fullyQualified :: Text -> NativeTypeValidate
- fullyQualifieds :: Text -> NativeTypeValidate
- values :: [Text] -> Text -> NativeTypeValidate
- defaultvalue :: Text -> Text -> NativeTypeValidate
- concattype :: NativeTypeName -> (NativeTypeName, NativeTypeMethods)
- nameval :: Text -> NativeTypeValidate
- defaultValidate :: HashSet Text -> NativeTypeValidate
- type NativeTypeName = Text
- parameterFunctions :: [(Text, [Text -> NativeTypeValidate])] -> NativeTypeValidate
- integer :: Text -> NativeTypeValidate
- integers :: Text -> NativeTypeValidate
- mandatory :: Text -> NativeTypeValidate
- mandatoryIfNotAbsent :: Text -> NativeTypeValidate
- inrange :: Integer -> Integer -> Text -> NativeTypeValidate
- faketype :: NativeTypeName -> (NativeTypeName, NativeTypeMethods)
- defaulttype :: NativeTypeName -> (NativeTypeName, NativeTypeMethods)
- runarray :: Text -> (Text -> PValue -> NativeTypeValidate) -> NativeTypeValidate
- perror :: Doc -> Either PrettyError Resource
- validateSourceOrContent :: NativeTypeValidate
Documentation
module Puppet.PP
ipaddr :: Text -> NativeTypeValidate #
nativetypemethods :: [(Text, [Text -> NativeTypeValidate])] -> NativeTypeValidate -> NativeTypeMethods #
rarray :: Text -> NativeTypeValidate #
string :: Text -> NativeTypeValidate #
This checks that a given parameter is a string. If it is a ResolvedInt
or
ResolvedBool
it will convert them to strings.
strings :: Text -> NativeTypeValidate #
string_s :: Text -> NativeTypeValidate #
Validates a string or an array of strings
values :: [Text] -> Text -> NativeTypeValidate #
Makes sure that the parameter, if defined, has a value among this list.
defaultvalue :: Text -> Text -> NativeTypeValidate #
This fills the default values of unset parameters.
nameval :: Text -> NativeTypeValidate #
Copies the "name" value into the parameter if this is not set. It implies
the string
validator.
defaultValidate :: HashSet Text -> NativeTypeValidate #
Validate resources given a list of valid parameters:
- checks that no unknown parameters have been set (except metaparameters)
type NativeTypeName = Text #
parameterFunctions :: [(Text, [Text -> NativeTypeValidate])] -> NativeTypeValidate #
Helper that takes a list of stuff and will generate a validator.
integer :: Text -> NativeTypeValidate #
Checks that a given parameter, if set, is a ResolvedInt
. If it is a
PString
it will attempt to parse it.
integers :: Text -> NativeTypeValidate #
mandatory :: Text -> NativeTypeValidate #
Checks that a given parameter is set.
mandatoryIfNotAbsent :: Text -> NativeTypeValidate #
Checks that a given parameter is set unless the resources "ensure" is set to absent
runarray :: Text -> (Text -> PValue -> NativeTypeValidate) -> NativeTypeValidate #
Helper function that runs a validor on a PArray