propellor-5.13: property-based host configuration management in haskell
Safe HaskellNone
LanguageHaskell2010

Propellor.Types.Info

Synopsis

Documentation

newtype Info Source #

Information about a Host, which can be provided by its properties.

Many different types of data can be contained in the same Info value at the same time. See toInfo and fromInfo.

Constructors

Info [InfoEntry] 

Instances

Instances details
Show Info Source # 
Instance details

Defined in Propellor.Types.Info

Methods

showsPrec :: Int -> Info -> ShowS #

show :: Info -> String #

showList :: [Info] -> ShowS #

Semigroup Info Source # 
Instance details

Defined in Propellor.Types.Info

Methods

(<>) :: Info -> Info -> Info #

sconcat :: NonEmpty Info -> Info #

stimes :: Integral b => b -> Info -> Info #

Monoid Info Source # 
Instance details

Defined in Propellor.Types.Info

Methods

mempty :: Info #

mappend :: Info -> Info -> Info #

mconcat :: [Info] -> Info #

data InfoEntry where Source #

Constructors

InfoEntry :: (IsInfo v, Typeable v) => v -> InfoEntry 

Instances

Instances details
Show InfoEntry Source # 
Instance details

Defined in Propellor.Types.Info

class (Typeable v, Monoid v, Show v) => IsInfo v where Source #

Values stored in Info must be members of this class.

This is used to avoid accidentially using other data types as info, especially type aliases which coud easily lead to bugs. We want a little bit of dynamic types here, but not too far..

Methods

propagateInfo :: v -> PropagateInfo Source #

Should this info be propagated out of a container to its Host?

Instances

Instances details
IsInfo NamedConfMap Source # 
Instance details

Defined in Propellor.Types.Dns

IsInfo DnsInfoUnpropagated Source # 
Instance details

Defined in Propellor.Types.Dns

IsInfo DnsInfoPropagated Source # 
Instance details

Defined in Propellor.Types.Dns

IsInfo AliasesInfo Source # 
Instance details

Defined in Propellor.Types.Dns

IsInfo DockerInfo Source # 
Instance details

Defined in Propellor.Types.Docker

IsInfo ChrootInfo Source # 
Instance details

Defined in Propellor.Types.Chroot

IsInfo PrivInfo Source # 
Instance details

Defined in Propellor.PrivData

IsInfo PkgUpgrade Source # 
Instance details

Defined in Propellor.Property.FreeBSD.Pkg

IsInfo PkgUpdate Source # 
Instance details

Defined in Propellor.Property.FreeBSD.Pkg

IsInfo PoudriereConfigured Source # 
Instance details

Defined in Propellor.Property.FreeBSD.Poudriere

IsInfo PartInfo Source # 
Instance details

Defined in Propellor.Property.DiskImage.PartSpec

IsInfo [ContainerCapability] Source #

A [ContainerCapability] can be used as Info. It does not propagate out to the Host. When not in a container, the Info value will be [].

Instance details

Defined in Propellor.Types.Container

IsInfo [BootloaderInstalled] Source # 
Instance details

Defined in Propellor.Types.Bootloader

(Typeable v, Show v) => IsInfo (InfoVal v) Source # 
Instance details

Defined in Propellor.Types.Info

data PropagateInfo Source #

Constructors

PropagateInfo Bool 
PropagatePrivData

Info about PrivData generally will be propigated even in cases where other Info is not, so it treated specially.

addInfo :: IsInfo v => Info -> v -> Info Source #

Any value in the IsInfo type class can be added to an Info.

toInfo :: IsInfo v => v -> Info Source #

Converts any value in the IsInfo type class into an Info, which is otherwise empty.

fromInfo :: IsInfo v => Info -> v Source #

Extracts a value from an Info.

mapInfo :: IsInfo v => (v -> v) -> Info -> Info Source #

Maps a function over all values stored in the Info that are of the appropriate type.

data InfoVal v Source #

Use this to put a value in Info that is not a monoid. The last value set will be used. This info does not propagate out of a container.

Constructors

NoInfoVal 
InfoVal v 

Instances

Instances details
Show v => Show (InfoVal v) Source # 
Instance details

Defined in Propellor.Types.Info

Methods

showsPrec :: Int -> InfoVal v -> ShowS #

show :: InfoVal v -> String #

showList :: [InfoVal v] -> ShowS #

Semigroup (InfoVal v) Source # 
Instance details

Defined in Propellor.Types.Info

Methods

(<>) :: InfoVal v -> InfoVal v -> InfoVal v #

sconcat :: NonEmpty (InfoVal v) -> InfoVal v #

stimes :: Integral b => b -> InfoVal v -> InfoVal v #

Monoid (InfoVal v) Source # 
Instance details

Defined in Propellor.Types.Info

Methods

mempty :: InfoVal v #

mappend :: InfoVal v -> InfoVal v -> InfoVal v #

mconcat :: [InfoVal v] -> InfoVal v #

(Typeable v, Show v) => IsInfo (InfoVal v) Source # 
Instance details

Defined in Propellor.Types.Info

class Typeable (a :: k) #

The class Typeable allows a concrete representation of a type to be calculated.

Minimal complete definition

typeRep#