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

Safe HaskellNone

Puppet.Interpreter.Types

Synopsis

Documentation

data HieraQueryType Source

The different kind of hiera queries

Constructors

Priority

standard hiera query

ArrayMerge

hiera_array

HashMerge

hiera_hash

data TopLevelType Source

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 Source

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 Source

Constructors

Warning Doc 

data ModifierType Source

Constructors

ModifierCollector

For collectors, optional resources

ModifierMustMatch

For stuff like realize

Instances

data OverrideType Source

Constructors

CantOverride

Overriding forbidden, will throw an error

Replace

Can silently replace

CantReplace

Silently ignore errors

data Resource Source

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 ResourceSource

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

data Query a Source

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 Source

Fields for the fact endpoint

Constructors

FName 
FValue 
FCertname 

data NodeField Source

Fields for the node endpoint

Constructors

NName 
NFact Text 

data ResourceField Source

Fields for the resource endpoint

class HasWVersion c e | c -> e whereSource

Methods

wVersion :: Lens' c eSource

class HasWEdges c e | c -> e whereSource

Methods

wEdges :: Lens' c eSource

class HasWResources c e | c -> e whereSource

Methods

wResources :: Lens' c eSource

class HasFactname c e | c -> e whereSource

Methods

factname :: Lens' c eSource

class HasFactval c e | c -> e whereSource

Methods

factval :: Lens' c eSource

class HasDeactivated c e | c -> e whereSource

Methods

deactivated :: Lens' c eSource

class HasCatalogT c e | c -> e whereSource

Methods

catalogT :: Lens' c eSource

class HasFactsT c e | c -> e whereSource

Methods

factsT :: Lens' c eSource

class HasReportT c e | c -> e whereSource

Methods

reportT :: Lens' c eSource

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

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

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

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

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

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

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

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