Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Pythia.Services.NetInterface.NmCli
Description
This module provides functionality for retrieving network connection information using nmcli.
Since: 0.1
Synopsis
- netInterfaceShellApp :: (MonadPathReader m, MonadThrow m, MonadTypedProcess m) => m NetInterfaces
- supported :: MonadPathReader m => m Bool
- newtype NmCliParseError = MkNmCliParseError Text
- parseInterfaces :: Text -> Either NmCliParseError NetInterfaces
Query
netInterfaceShellApp :: (MonadPathReader m, MonadThrow m, MonadTypedProcess m) => m NetInterfaces Source #
NmCli query for NetInterfaces
.
Since: 0.1
supported :: MonadPathReader m => m Bool Source #
Returns a boolean determining if this program is supported on the current system.
Since: 0.1
Misc
newtype NmCliParseError Source #
Error parsing nmcli output.
Examples
>>>
displayException $ MkNmCliParseError "parse error"
"NmCli parse error: parse error"
Since: 0.1
Constructors
MkNmCliParseError Text |
Instances
Exception NmCliParseError Source # | Since: 0.1 |
Defined in Pythia.Services.NetInterface.NmCli Methods toException :: NmCliParseError -> SomeException # | |
Show NmCliParseError Source # | Since: 0.1 |
Defined in Pythia.Services.NetInterface.NmCli Methods showsPrec :: Int -> NmCliParseError -> ShowS # show :: NmCliParseError -> String # showList :: [NmCliParseError] -> ShowS # | |
Eq NmCliParseError Source # | Since: 0.1 |
Defined in Pythia.Services.NetInterface.NmCli Methods (==) :: NmCliParseError -> NmCliParseError -> Bool # (/=) :: NmCliParseError -> NmCliParseError -> Bool # |
parseInterfaces :: Text -> Either NmCliParseError NetInterfaces Source #
Attemps to parse the output of nmcli.
Since: 0.1