-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | app container types and tools -- @package appc @version 0.0.6 module Data.AppContainer.TH -- | Generates both ToJSON and FromJSON instance declarations -- for the given data type. -- -- This is a convienience function which is equivalent to calling both -- deriveToJSON and deriveFromJSON. deriveJSON :: Options -> Name -> Q [Dec] -- | Generates a ToJSON instance declaration for the given data -- type. deriveToJSON :: Options -> Name -> Q [Dec] deriveJSONOptions :: String -> Options -- | A type that can be converted from JSON, with the possibility of -- failure. -- -- When writing an instance, use empty, mzero, or -- fail to make a conversion fail, e.g. if an Object is -- missing a required key, or the value is of the wrong type. -- -- An example type and instance: -- -- @{-# LANGUAGE OverloadedStrings #-} -- -- data Coord = Coord { x :: Double, y :: Double } -- -- instance FromJSON Coord where parseJSON (Object v) = Coord -- <$> v .: "x" <*> v .: -- "y" -- -- -- A non-Object value is of the wrong type, so use -- mzero to fail. parseJSON _ = mzero @ -- -- Note the use of the OverloadedStrings language extension -- which enables Text values to be written as string literals. -- -- Instead of manually writing your FromJSON instance, there are -- three options to do it automatically: -- --
-- instance FromJSON Coord where -- parseJSON = genericParseJSON defaultOptions --class FromJSON a parseJSON :: FromJSON a => Value -> Parser a -- | A type that can be converted to JSON. -- -- An example type and instance: -- -- @{-# LANGUAGE OverloadedStrings #-} -- -- data Coord = Coord { x :: Double, y :: Double } -- -- instance ToJSON Coord where toJSON (Coord x y) = object ["x" -- .= x, "y" .= y] @ -- -- Note the use of the OverloadedStrings language extension -- which enables Text values to be written as string literals. -- -- Instead of manually writing your ToJSON instance, there are -- three options to do it automatically: -- --
-- instance ToJSON Coord where -- toJSON = genericToJSON defaultOptions --class ToJSON a toJSON :: ToJSON a => a -> Value module Data.AppContainer.Types data ImageManifest ImageManifest :: !Text -> !Version -> ![Label] -> !(Maybe App) -> ![Dependency] -> ImageManifest imName :: ImageManifest -> !Text imVersion :: ImageManifest -> !Version imLabels :: ImageManifest -> ![Label] imApp :: ImageManifest -> !(Maybe App) imDependencies :: ImageManifest -> ![Dependency] data ContainerRuntimeManifest ContainerRuntimeManifest :: !UUID -> !Version -> ![Image] -> ![Volume] -> ContainerRuntimeManifest crmUUID :: ContainerRuntimeManifest -> !UUID crmVersion :: ContainerRuntimeManifest -> !Version crmImages :: ContainerRuntimeManifest -> ![Image] crmVolumes :: ContainerRuntimeManifest -> ![Volume] data App App :: ![Text] -> !Text -> !Text -> ![EventHandler] -> !(Map Text Text) -> ![MountPoint] -> ![Port] -> !Text -> App appExec :: App -> ![Text] appUser :: App -> !Text appGroup :: App -> !Text appEventHandlers :: App -> ![EventHandler] appEnvironment :: App -> !(Map Text Text) appMountPoints :: App -> ![MountPoint] appPorts :: App -> ![Port] appWorkingDirectory :: App -> !Text data Dependency Dependency :: !Text -> ![Label] -> !Text -> !Text -> Dependency depName :: Dependency -> !Text depLabels :: Dependency -> ![Label] depHash :: Dependency -> !Text depRoot :: Dependency -> !Text data EventHandler EventHandler :: !Text -> ![Text] -> EventHandler ehName :: EventHandler -> !Text ehExec :: EventHandler -> ![Text] data Image Image :: !Text -> !Text -> Image imageApp :: Image -> !Text imageImageID :: Image -> !Text data Label Label :: !Text -> !Text -> Label labelName :: Label -> !Text labelVal :: Label -> !Text data MountPoint MountPoint :: !Text -> !Text -> !Bool -> MountPoint mpName :: MountPoint -> !Text mpPath :: MountPoint -> !Text mpReadOnly :: MountPoint -> !Bool data Port Port :: !Text -> !Text -> !Int -> !Bool -> Port portName :: Port -> !Text portProtocol :: Port -> !Text portPort :: Port -> !Int portSocketActivated :: Port -> !Bool data Volume Volume :: ![Text] -> !VolumeSource -> Volume volFulfills :: Volume -> ![Text] volSource :: Volume -> !VolumeSource data VolumeSource EmptyVolumeSource :: VolumeSource HostVolumeSource :: HostVolume -> VolumeSource data HostVolume HostVolume :: !Text -> !Bool -> HostVolume hvSource :: HostVolume -> !Text hvReadOnly :: HostVolume -> !Bool instance FromJSON Image instance ToJSON Image instance ToJSON Port instance ToJSON MountPoint instance FromJSON Label instance ToJSON Label instance FromJSON EventHandler instance ToJSON EventHandler instance FromJSON Dependency instance ToJSON Dependency instance ToJSON App instance Show Label instance Eq Label instance Show Image instance Eq Image instance Show EventHandler instance Eq EventHandler instance Show MountPoint instance Eq MountPoint instance Show HostVolume instance Eq HostVolume instance Show VolumeSource instance Eq VolumeSource instance Show Volume instance Eq Volume instance Show ContainerRuntimeManifest instance Eq ContainerRuntimeManifest instance Show Port instance Eq Port instance Show App instance Eq App instance Show Dependency instance Eq Dependency instance Show ImageManifest instance Eq ImageManifest instance FromJSON UUID instance ToJSON UUID instance FromJSON Port instance FromJSON HostVolume instance FromJSON VolumeSource instance ToJSON Volume instance FromJSON Volume instance FromJSON MountPoint instance FromJSON App instance ToJSON ContainerRuntimeManifest instance FromJSON ContainerRuntimeManifest instance ToJSON ImageManifest instance FromJSON ImageManifest module Data.AppContainer verifyImageManifest :: String -> IO Bool verifyContainerRuntimeManifest :: String -> IO Bool buildImage :: String -> String -> IO ()