language-puppet-0.10.3: Tools to parse and evaluate the Puppet DSL.

Safe HaskellNone

Puppet.Interpreter.Types

Synopsis

Documentation

type Nodename = Text

data HieraQueryType

The different kind of hiera queries

Constructors

Priority

standard hiera query

ArrayMerge

hiera_array

HashMerge

hiera_hash

type HieraQueryFunc = Container ScopeInformation -> Text -> HieraQueryType -> IO (Either Doc (Pair InterpreterWriter (Maybe PValue)))

The type of the Hiera API function

type Scope = Text

data TopLevelType

This type is used to differenciate the distinct top level types that are exposed by the DSL.

Constructors

TopNode

This is for node entries.

TopDefine

This is for defines.

TopClass

This is for classes.

TopSpurious

This one is special. It represents top level statements that are not part of a node, define or class. It is defined as spurious because it is not what you are supposed to be. Also the caching system doesn't like them too much right now.

data CurContainerDesc

Constructors

ContRoot

Contained at node or root level

ContClass !Text

Contained in a class

ContDefine !Text !Text

Contained in a define

ContImported !CurContainerDesc

Dummy container for imported resources, so that we know we must update the nodename

ContImport !Nodename !CurContainerDesc

This one is used when finalizing imported resources, and contains the current node name

newtype Warning

Constructors

Warning Doc 

data ModifierType

Constructors

ModifierCollector

For collectors, optional resources

ModifierMustMatch

For stuff like realize

Instances

data OverrideType

Constructors

CantOverride

Overriding forbidden, will throw an error

Replace

Can silently replace

CantReplace

Silently ignore errors

data Resource

This is a fully resolved resource that will be used in the FinalCatalog.

Constructors

Resource 

Fields

_rid :: !RIdentifier

Resource name.

_ralias :: !(HashSet Text)

All the resource aliases

_rattributes :: !(Container PValue)

Resource parameters.

_rrelations :: !(HashMap RIdentifier (HashSet LinkType))

Resource relations.

_rscope :: ![CurContainerDesc]

Resource scope when it was defined, the real container will be the first item

_rvirtuality :: !Virtuality
 
_rtags :: !(HashSet Text)
 
_rpos :: !PPosition

Source code position of the resource definition.

_rnode :: !Nodename

The node were this resource was created, if remote

type PuppetTypeValidate = Resource -> Either Doc Resource

This is a function type than can be bound. It is the type of all subsequent validators.

data Query a

Pretty straightforward way to define the various PuppetDB queries

Constructors

QEqual a Text 
QG a Integer 
QL a Integer 
QGE a Integer 
QLE a Integer 
QMatch Text Text 
QAnd [Query a] 
QOr [Query a] 
QNot (Query a) 
QEmpty 

Instances

ToJSON a => ToJSON (Query a) 
FromJSON a => FromJSON (Query a) 

data FactField

Fields for the fact endpoint

Constructors

FName 
FValue 
FCertname 

data NodeField

Fields for the node endpoint

Constructors

NName 
NFact Text 

data ResourceField

Fields for the resource endpoint

class HasWVersion c e | c -> e where

Methods

wVersion :: Lens' c e

class HasWEdges c e | c -> e where

Methods

wEdges :: Lens' c e

class HasWResources c e | c -> e where

Methods

wResources :: Lens' c e

class HasTransactionUUID c e | c -> e where

Methods

transactionUUID :: Lens' c e

class HasFactname c e | c -> e where

Methods

factname :: Lens' c e

class HasFactval c e | c -> e where

Methods

factval :: Lens' c e

class HasDeactivated c e | c -> e where

Methods

deactivated :: Lens' c e

class HasCatalogT c e | c -> e where

Methods

catalogT :: Lens' c e

class HasFactsT c e | c -> e where

Methods

factsT :: Lens' c e

class HasReportT c e | c -> e where

Methods

reportT :: Lens' c e

ifromList :: (Monoid m, At m) => [(Index m, IxValue m)] -> m

helper for hashmap, in case we want another kind of map ..

ikeys :: (Eq k, Hashable k) => HashMap k v -> HashSet k

isingleton :: (Monoid b, At b) => Index b -> IxValue b -> b

ifromListWith :: (Monoid m, At m) => (IxValue m -> IxValue m -> IxValue m) -> [(Index m, IxValue m)] -> m

iinsertWith :: At m => (IxValue m -> IxValue m -> IxValue m) -> Index m -> IxValue m -> m -> m

iunionWith :: (Hashable k, Eq k) => (v -> v -> v) -> HashMap k v -> HashMap k v -> HashMap k v

fnull :: (Eq x, Monoid x) => x -> Bool