{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Plutus.PAB.Run.Command
( ConfigCommand(..)
, allServices
) where
import Data.Aeson qualified as JSON
import GHC.Generics (Generic)
import Wallet.Types (ContractInstanceId)
data ConfigCommand =
Migrate
| StartNode
| MockWallet
| ChainIndex
| ForkCommands [ConfigCommand]
| ContractState ContractInstanceId
| ReportContractHistory ContractInstanceId
| ReportAvailableContracts
| ReportActiveContracts
| PABWebserver
deriving stock (Int -> ConfigCommand -> ShowS
[ConfigCommand] -> ShowS
ConfigCommand -> String
(Int -> ConfigCommand -> ShowS)
-> (ConfigCommand -> String)
-> ([ConfigCommand] -> ShowS)
-> Show ConfigCommand
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigCommand] -> ShowS
$cshowList :: [ConfigCommand] -> ShowS
show :: ConfigCommand -> String
$cshow :: ConfigCommand -> String
showsPrec :: Int -> ConfigCommand -> ShowS
$cshowsPrec :: Int -> ConfigCommand -> ShowS
Show, ConfigCommand -> ConfigCommand -> Bool
(ConfigCommand -> ConfigCommand -> Bool)
-> (ConfigCommand -> ConfigCommand -> Bool) -> Eq ConfigCommand
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigCommand -> ConfigCommand -> Bool
$c/= :: ConfigCommand -> ConfigCommand -> Bool
== :: ConfigCommand -> ConfigCommand -> Bool
$c== :: ConfigCommand -> ConfigCommand -> Bool
Eq, (forall x. ConfigCommand -> Rep ConfigCommand x)
-> (forall x. Rep ConfigCommand x -> ConfigCommand)
-> Generic ConfigCommand
forall x. Rep ConfigCommand x -> ConfigCommand
forall x. ConfigCommand -> Rep ConfigCommand x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigCommand x -> ConfigCommand
$cfrom :: forall x. ConfigCommand -> Rep ConfigCommand x
Generic)
deriving anyclass [ConfigCommand] -> Value
[ConfigCommand] -> Encoding
ConfigCommand -> Value
ConfigCommand -> Encoding
(ConfigCommand -> Value)
-> (ConfigCommand -> Encoding)
-> ([ConfigCommand] -> Value)
-> ([ConfigCommand] -> Encoding)
-> ToJSON ConfigCommand
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ConfigCommand] -> Encoding
$ctoEncodingList :: [ConfigCommand] -> Encoding
toJSONList :: [ConfigCommand] -> Value
$ctoJSONList :: [ConfigCommand] -> Value
toEncoding :: ConfigCommand -> Encoding
$ctoEncoding :: ConfigCommand -> Encoding
toJSON :: ConfigCommand -> Value
$ctoJSON :: ConfigCommand -> Value
JSON.ToJSON
allServices :: ConfigCommand
allServices :: ConfigCommand
allServices =
[ConfigCommand] -> ConfigCommand
ForkCommands
[ ConfigCommand
StartNode
, ConfigCommand
MockWallet
, ConfigCommand
PABWebserver
, ConfigCommand
ChainIndex
]