Safe Haskell | None |
---|
These are the function and data types that are used to define the Puppet native types.
- faketype :: PuppetTypeName -> (PuppetTypeName, PuppetTypeMethods)
- defaulttype :: PuppetTypeName -> (PuppetTypeName, PuppetTypeMethods)
- defaultValidate :: Set Text -> PuppetTypeValidate
- checkParameterList :: Set Text -> PuppetTypeValidate
- addDefaults :: PuppetTypeValidate
- runarray :: Text -> (Text -> ResolvedValue -> PuppetTypeValidate) -> PuppetTypeValidate
- string :: Text -> PuppetTypeValidate
- strings :: Text -> PuppetTypeValidate
- string' :: Text -> ResolvedValue -> PuppetTypeValidate
- values :: [Text] -> Text -> PuppetTypeValidate
- defaultvalue :: Text -> Text -> PuppetTypeValidate
- integer :: Text -> PuppetTypeValidate
- integers :: Text -> PuppetTypeValidate
- integer'' :: Text -> ResolvedValue -> PuppetTypeValidate
- nameval :: Text -> PuppetTypeValidate
- addAlias' :: Text -> PuppetTypeValidate
- mandatory :: Text -> PuppetTypeValidate
- parameterFunctions :: [(Text, [Text -> PuppetTypeValidate])] -> PuppetTypeValidate
- fullyQualified :: Text -> PuppetTypeValidate
- noTrailingSlash :: Text -> PuppetTypeValidate
- fullyQualifieds :: Text -> PuppetTypeValidate
- fullyQualified' :: Text -> ResolvedValue -> PuppetTypeValidate
- rarray :: Text -> PuppetTypeValidate
- ipaddr :: Text -> PuppetTypeValidate
- checkipv4 :: Text -> Int -> Bool
- inrange :: Integer -> Integer -> Text -> PuppetTypeValidate
Documentation
defaultValidate :: Set Text -> PuppetTypeValidateSource
This helper will validate resources given a list of fields. It will run
checkParameterList
and then addDefaults
.
checkParameterList :: Set Text -> PuppetTypeValidateSource
This validator checks that no unknown parameters have been set (except metaparameters)
addDefaults :: PuppetTypeValidateSource
This validator always accept the resources, but add the default parameters (such as title).
runarray :: Text -> (Text -> ResolvedValue -> PuppetTypeValidate) -> PuppetTypeValidateSource
Helper function that runs a validor on a ResolvedArray
string :: Text -> PuppetTypeValidateSource
This checks that a given parameter is a string. If it is a ResolvedInt
or
ResolvedBool
it will convert them to strings.
string' :: Text -> ResolvedValue -> PuppetTypeValidateSource
values :: [Text] -> Text -> PuppetTypeValidateSource
Makes sure that the parameter, if defined, has a value among this list.
defaultvalue :: Text -> Text -> PuppetTypeValidateSource
This fills the default values of unset parameters.
integer :: Text -> PuppetTypeValidateSource
Checks that a given parameter, if set, is a ResolvedInt
. If it is a
ResolvedString
it will attempt to parse it.
mandatory :: Text -> PuppetTypeValidateSource
Checks that a given parameter is set.
parameterFunctions :: [(Text, [Text -> PuppetTypeValidate])] -> PuppetTypeValidateSource
Helper that takes a list of stuff and will generate a validator.