module Fedora.Koji.Internal
( Info(..)
, koji
, hello
, checkTagAccess
, checkTagPackage
, getAPIVersion
, getActiveRepos
, getAllArches
, getAllPerms
, getArchive
, getArchiveFile
, getArchiveType
, getArchiveTypes
, getAverageBuildDuration
, getBuild
, getBuildConfig
, getBuildLogs
, getBuildTarget
, getBuildTargets
, getBuildType
, getBuildroot
, getBuildrootListing
, getChangelogEntries
, getChannel
, getEvent
, getExternalRepo
, getExternalRepoList
, getFullInheritance
, getGlobalInheritance
, getGroupMembers
, getHost
, getImageArchive
, getImageBuild
, getInheritanceData
, getLastEvent
, getLastHostUpdate
, getLatestBuilds
, getLatestMavenArchives
, getLatestRPMS
, getMavenArchive
, getMavenBuild
, getNextRelease
, getPackage
, getPackageConfig
, getPackageID
, getRPM
, getRPMDeps
, getRPMFile
, getRPMHeaders
, getRepo
, getTag
, getTagExternalRepos
, getTagGroups
, getTagID
, getTaskChildren
, getTaskDescendents
, getTaskInfo
, getTaskRequest
, getTaskResult
, getUser
, getUserPerms
, getVolume
, getWinArchive
, getWinBuild
, listArchiveFiles
, listArchives
, listBTypes
, listBuildRPMs
, listBuildroots
, listBuilds
, listCGs
, listChannels
, listExternalRepos
, listHosts
, listPackages
, listPackagesSimple
, listRPMFiles
, listRPMs
, listSideTags
, listTagged
, listTaggedArchives
, listTaggedRPMS
, listTags
, listTaskOutput
, listTasks
, listUsers
, listVolumes
, repoInfo
, resubmitTask
, tagChangedSinceEvent
, tagHistory
, taskFinished
, taskReport
, Value(..)
, Struct
, lookupStruct
, maybeVal
, maybeStruct
, structArray
, getValue
)
where
import Data.Maybe
import Network.XmlRpc.Client
import Network.XmlRpc.Internals
import Control.Monad.Except (runExceptT)
koji :: Remote a
=> String
-> String
-> a
koji :: String -> String -> a
koji = String -> String -> a
forall a. Remote a => String -> String -> a
remote
type Struct = [(String,Value)]
maybeString :: Maybe String -> Value
maybeString :: Maybe String -> Value
maybeString = Value -> (String -> Value) -> Maybe String -> Value
forall b a. b -> (a -> b) -> Maybe a -> b
maybe Value
ValueNil String -> Value
ValueString
maybeInt :: Maybe Int -> Value
maybeInt :: Maybe Int -> Value
maybeInt = Value -> (Int -> Value) -> Maybe Int -> Value
forall b a. b -> (a -> b) -> Maybe a -> b
maybe Value
ValueNil Int -> Value
ValueInt
maybeValue :: Maybe Value -> Value
maybeValue :: Maybe Value -> Value
maybeValue = Value -> Maybe Value -> Value
forall a. a -> Maybe a -> a
fromMaybe Value
ValueNil
data Info = InfoID Int | InfoString String
infoValue :: Info -> Value
infoValue :: Info -> Value
infoValue (InfoID Int
i) = Int -> Value
ValueInt Int
i
infoValue (InfoString String
s) = String -> Value
ValueString String
s
maybeInfo :: Maybe Info -> Value
maybeInfo :: Maybe Info -> Value
maybeInfo = Value -> (Info -> Value) -> Maybe Info -> Value
forall b a. b -> (a -> b) -> Maybe a -> b
maybe Value
ValueNil Info -> Value
infoValue
maybeStruct :: Value -> Maybe Struct
maybeStruct :: Value -> Maybe Struct
maybeStruct (ValueStruct Struct
st) = Struct -> Maybe Struct
forall a. a -> Maybe a
Just Struct
st
maybeStruct Value
_ = Maybe Struct
forall a. Maybe a
Nothing
structArray :: Value -> [Struct]
structArray :: Value -> [Struct]
structArray (ValueArray [Value]
v) = (Value -> Maybe Struct) -> [Value] -> [Struct]
forall a b. (a -> Maybe b) -> [a] -> [b]
mapMaybe Value -> Maybe Struct
maybeStruct [Value]
v
structArray Value
_ = []
checkTagAccess :: String -> Int -> Int -> IO Value
checkTagAccess :: String -> Int -> Int -> IO Value
checkTagAccess String
hubUrl = String -> String -> Int -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"checkTagAccess"
checkTagPackage :: String -> Info -> Info -> IO Bool
checkTagPackage :: String -> Info -> Info -> IO Bool
checkTagPackage String
hubUrl Info
taginfo Info
pkginfo = String -> String -> Value -> Value -> IO Bool
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"checkTagPackage" (Info -> Value
infoValue Info
taginfo) (Info -> Value
infoValue Info
pkginfo)
getAPIVersion :: String -> IO String
getAPIVersion :: String -> IO String
getAPIVersion String
hubUrl = String -> String -> IO String
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getAPIVersion"
getActiveRepos :: String -> IO Value
getActiveRepos :: String -> IO Value
getActiveRepos String
hubUrl = String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getActiveRepos"
getAllArches :: String -> IO Value
getAllArches :: String -> IO Value
getAllArches String
hubUrl = String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getAllArches"
getAllPerms :: String -> IO [Struct]
getAllPerms :: String -> IO [Struct]
getAllPerms String
hubUrl = String -> String -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getAllPerms"
getArchive :: String -> Int -> IO (Maybe Struct)
getArchive :: String -> Int -> IO (Maybe Struct)
getArchive String
hubUrl = (Value -> Maybe Struct) -> IO Value -> IO (Maybe Struct)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Value -> Maybe Struct
maybeStruct (IO Value -> IO (Maybe Struct))
-> (Int -> IO Value) -> Int -> IO (Maybe Struct)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getArchive"
getArchiveFile :: String -> Int -> FilePath -> IO (Maybe Struct)
getArchiveFile :: String -> Int -> String -> IO (Maybe Struct)
getArchiveFile String
hubUrl Int
archiveID String
file = Value -> Maybe Struct
maybeStruct (Value -> Maybe Struct) -> IO Value -> IO (Maybe Struct)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> String -> Int -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getArchiveFile" Int
archiveID String
file
getArchiveType :: String -> Maybe FilePath -> Maybe String -> Maybe Int -> IO Value
getArchiveType :: String -> Maybe String -> Maybe String -> Maybe Int -> IO Value
getArchiveType String
hubUrl Maybe String
filename Maybe String
type_name Maybe Int
type_id =
String -> String -> Value -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getArchiveType" (Maybe String -> Value
maybeString Maybe String
filename) (Maybe String -> Value
maybeString Maybe String
type_name) (Maybe Int -> Value
maybeInt Maybe Int
type_id)
getArchiveTypes :: String -> IO Value
getArchiveTypes :: String -> IO Value
getArchiveTypes String
hubUrl = String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getArchiveTypes"
getAverageBuildDuration :: String -> Info -> IO Value
getAverageBuildDuration :: String -> Info -> IO Value
getAverageBuildDuration String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getAverageBuildDuration" (Value -> IO Value) -> (Info -> Value) -> Info -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Info -> Value
infoValue
getBuild :: String
-> Info
-> IO (Maybe Struct)
getBuild :: String -> Info -> IO (Maybe Struct)
getBuild String
hubUrl = (Value -> Maybe Struct) -> IO Value -> IO (Maybe Struct)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Value -> Maybe Struct
maybeStruct (IO Value -> IO (Maybe Struct))
-> (Info -> IO Value) -> Info -> IO (Maybe Struct)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getBuild" (Value -> IO Value) -> (Info -> Value) -> Info -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Info -> Value
infoValue
getBuildConfig :: String -> String -> IO Value
getBuildConfig :: String -> String -> IO Value
getBuildConfig String
hubUrl = String -> String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getBuildConfig"
getBuildLogs :: String -> Info
-> IO Value
getBuildLogs :: String -> Info -> IO Value
getBuildLogs String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getBuildLogs" (Value -> IO Value) -> (Info -> Value) -> Info -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Info -> Value
infoValue
getBuildTarget :: String -> String -> IO Value
getBuildTarget :: String -> String -> IO Value
getBuildTarget String
hubUrl = String -> String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getBuildTarget"
getBuildTargets :: String -> Maybe Info -> Maybe Int -> Maybe Int -> Maybe Int -> IO Value
getBuildTargets :: String
-> Maybe Info -> Maybe Int -> Maybe Int -> Maybe Int -> IO Value
getBuildTargets String
hubUrl Maybe Info
info Maybe Int
event Maybe Int
buildTagId Maybe Int
destTagId =
String -> String -> Value -> Value -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getBuildTargets" (Maybe Info -> Value
maybeInfo Maybe Info
info) (Maybe Int -> Value
maybeInt Maybe Int
event) (Maybe Int -> Value
maybeInt Maybe Int
buildTagId) (Maybe Int -> Value
maybeInt Maybe Int
destTagId)
getBuildType :: String -> Info
-> IO Value
getBuildType :: String -> Info -> IO Value
getBuildType String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getBuildType" (Value -> IO Value) -> (Info -> Value) -> Info -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Info -> Value
infoValue
getBuildroot :: String -> Int -> IO Value
getBuildroot :: String -> Int -> IO Value
getBuildroot String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getBuildroot"
getBuildrootListing :: String -> Int -> IO Value
getBuildrootListing :: String -> Int -> IO Value
getBuildrootListing String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getBuildrootListing"
getChangelogEntries :: String
-> Maybe Int
-> Maybe Int
-> Maybe FilePath
-> Maybe String
-> Maybe String
-> Maybe String
-> IO [Struct]
getChangelogEntries :: String
-> Maybe Int
-> Maybe Int
-> Maybe String
-> Maybe String
-> Maybe String
-> Maybe String
-> IO [Struct]
getChangelogEntries String
hubUrl Maybe Int
buildID Maybe Int
taskID Maybe String
filepath Maybe String
author Maybe String
before Maybe String
after =
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getChangelogEntries" (Maybe Int -> Value
maybeInt Maybe Int
buildID) (Maybe Int -> Value
maybeInt Maybe Int
taskID) (Maybe String -> Value
maybeString Maybe String
filepath) (Maybe String -> Value
maybeString Maybe String
author) (Maybe String -> Value
maybeString Maybe String
before) (Maybe String -> Value
maybeString Maybe String
after)
getChannel :: String -> Info -> IO Value
getChannel :: String -> Info -> IO Value
getChannel String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getChannel" (Value -> IO Value) -> (Info -> Value) -> Info -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Info -> Value
infoValue
getEvent :: String -> Int -> IO Struct
getEvent :: String -> Int -> IO Struct
getEvent String
hubUrl = String -> String -> Int -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getEvent"
getExternalRepo :: String -> Info -> Maybe Int -> IO Struct
getExternalRepo :: String -> Info -> Maybe Int -> IO Struct
getExternalRepo String
hubUrl Info
info Maybe Int
event =
String -> String -> Value -> () -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getExternalRepo" (Info -> Value
infoValue Info
info) () (Maybe Int -> Value
maybeInt Maybe Int
event)
getExternalRepoList :: String -> Info -> Maybe Int -> IO [Struct]
getExternalRepoList :: String -> Info -> Maybe Int -> IO [Struct]
getExternalRepoList String
hubUrl Info
info Maybe Int
event =
String -> String -> Value -> Value -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getExternalRepoList" (Info -> Value
infoValue Info
info) (Maybe Int -> Value
maybeInt Maybe Int
event)
getFullInheritance :: String -> String -> Maybe Int -> Bool -> IO Value
getFullInheritance :: String -> String -> Maybe Int -> Bool -> IO Value
getFullInheritance String
hubUrl String
tag Maybe Int
event =
String -> String -> String -> Value -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getFullInheritance" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event)
getGlobalInheritance :: String -> Maybe Int -> IO Value
getGlobalInheritance :: String -> Maybe Int -> IO Value
getGlobalInheritance String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getGlobalInheritance" (Value -> IO Value)
-> (Maybe Int -> Value) -> Maybe Int -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe Int -> Value
maybeInt
getGroupMembers :: String -> String -> IO Value
getGroupMembers :: String -> String -> IO Value
getGroupMembers String
hubUrl = String -> String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getGroupMembers"
getHost :: String -> Info -> Maybe Int -> IO Struct
getHost :: String -> Info -> Maybe Int -> IO Struct
getHost String
hubUrl Info
info = String -> String -> Value -> () -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getHost" (Info -> Value
infoValue Info
info) () (Value -> IO Struct)
-> (Maybe Int -> Value) -> Maybe Int -> IO Struct
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe Int -> Value
maybeInt
getImageArchive :: String -> Int -> IO Struct
getImageArchive :: String -> Int -> IO Struct
getImageArchive String
hubUrl = String -> String -> Int -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getImageArchive"
getImageBuild :: String -> Info -> IO Struct
getImageBuild :: String -> Info -> IO Struct
getImageBuild String
hubUrl Info
info = String -> String -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getImageBuild" (Info -> Value
infoValue Info
info)
getInheritanceData :: String -> String -> Maybe Int -> IO Value
getInheritanceData :: String -> String -> Maybe Int -> IO Value
getInheritanceData String
hubUrl String
tag Maybe Int
event =
String -> String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getInheritanceData" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event)
getLastEvent :: String -> Maybe Int -> IO Value
getLastEvent :: String -> Maybe Int -> IO Value
getLastEvent String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getLastEvent" (Value -> IO Value)
-> (Maybe Int -> Value) -> Maybe Int -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe Int -> Value
maybeInt
getLastHostUpdate :: String -> Int -> IO Value
getLastHostUpdate :: String -> Int -> IO Value
getLastHostUpdate String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getLastHostUpdate"
getLatestBuilds :: String
-> Info
-> Maybe Int
-> Maybe String
-> Maybe String
-> IO [Struct]
getLatestBuilds :: String
-> Info -> Maybe Int -> Maybe String -> Maybe String -> IO [Struct]
getLatestBuilds String
hubUrl Info
tag Maybe Int
event Maybe String
pkg Maybe String
type_ =
String -> String -> Value -> Value -> Value -> Value -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getLatestBuilds" (Info -> Value
infoValue Info
tag) (Maybe Int -> Value
maybeInt Maybe Int
event) (Maybe String -> Value
maybeString Maybe String
pkg) (Maybe String -> Value
maybeString Maybe String
type_)
getLatestMavenArchives :: String -> String -> Maybe Int -> Bool -> IO Value
getLatestMavenArchives :: String -> String -> Maybe Int -> Bool -> IO Value
getLatestMavenArchives String
hubUrl String
tag Maybe Int
event =
String -> String -> String -> Value -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getLatestMavenArchives" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event)
getLatestRPMS :: String -> String -> Maybe String -> Maybe String -> Maybe Int -> Bool -> Maybe String -> IO Value
getLatestRPMS :: String
-> String
-> Maybe String
-> Maybe String
-> Maybe Int
-> Bool
-> Maybe String
-> IO Value
getLatestRPMS String
hubUrl String
tag Maybe String
pkg Maybe String
arch Maybe Int
event Bool
rpmsigs Maybe String
type_ =
String
-> String
-> String
-> Value
-> Value
-> Value
-> Bool
-> Value
-> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getLatestRPMS" String
tag (Maybe String -> Value
maybeString Maybe String
pkg) (Maybe String -> Value
maybeString Maybe String
arch) (Maybe Int -> Value
maybeInt Maybe Int
event) Bool
rpmsigs (Maybe String -> Value
maybeString Maybe String
type_)
getMavenArchive :: String -> Int -> IO Struct
getMavenArchive :: String -> Int -> IO Struct
getMavenArchive String
hubUrl = String -> String -> Int -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getMavenArchive"
getMavenBuild :: String -> Info -> IO Struct
getMavenBuild :: String -> Info -> IO Struct
getMavenBuild String
hubUrl Info
info = String -> String -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getMavenBuild" (Info -> Value
infoValue Info
info)
getNextRelease :: String -> Info -> IO Value
getNextRelease :: String -> Info -> IO Value
getNextRelease String
hubUrl Info
info = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getNextRelease" (Info -> Value
infoValue Info
info)
getPackage :: String -> Info -> IO Value
getPackage :: String -> Info -> IO Value
getPackage String
hubUrl Info
info = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getPackage" (Info -> Value
infoValue Info
info)
getPackageConfig :: String -> String -> String -> Maybe Int -> IO Value
getPackageConfig :: String -> String -> String -> Maybe Int -> IO Value
getPackageConfig String
hubUrl String
tag String
pkg Maybe Int
event =
String -> String -> String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getPackageConfig" String
tag String
pkg (Maybe Int -> Value
maybeInt Maybe Int
event)
getPackageID :: String -> String -> IO (Maybe Int)
getPackageID :: String -> String -> IO (Maybe Int)
getPackageID String
hubUrl String
pkg = do
Value
res <- String -> String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getPackageID" String
pkg
case Value
res of
ValueInt Int
i -> Maybe Int -> IO (Maybe Int)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Int -> IO (Maybe Int)) -> Maybe Int -> IO (Maybe Int)
forall a b. (a -> b) -> a -> b
$ Int -> Maybe Int
forall a. a -> Maybe a
Just Int
i
Value
_ -> Maybe Int -> IO (Maybe Int)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Int
forall a. Maybe a
Nothing
getRPM :: String -> Info -> IO Struct
getRPM :: String -> Info -> IO Struct
getRPM String
hubUrl = String -> String -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getRPM" (Value -> IO Struct) -> (Info -> Value) -> Info -> IO Struct
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Info -> Value
infoValue
getRPMDeps :: String -> Int -> Maybe String -> IO [Struct]
getRPMDeps :: String -> Int -> Maybe String -> IO [Struct]
getRPMDeps String
hubUrl Int
rpmid Maybe String
deptype =
String -> String -> Int -> Value -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getRPMDeps" Int
rpmid (Maybe String -> Value
maybeString Maybe String
deptype)
getRPMFile :: String -> Int -> FilePath -> IO Struct
getRPMFile :: String -> Int -> String -> IO Struct
getRPMFile String
hubUrl = String -> String -> Int -> String -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getRPMFile"
getRPMHeaders :: String -> Maybe Int -> Maybe Int -> Maybe FilePath -> Maybe Value -> IO Struct
String
hubUrl Maybe Int
rpmid Maybe Int
taskid Maybe String
file Maybe Value
headers =
String -> String -> Value -> Value -> Value -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getRPMHeaders" (Maybe Int -> Value
maybeInt Maybe Int
rpmid) (Maybe Int -> Value
maybeInt Maybe Int
taskid) (Maybe String -> Value
maybeString Maybe String
file) (Value -> Maybe Value -> Value
forall a. a -> Maybe a -> a
fromMaybe Value
ValueNil Maybe Value
headers)
getRepo :: String -> String -> Maybe Int -> Maybe Int -> Bool -> IO Value
getRepo :: String -> String -> Maybe Int -> Maybe Int -> Bool -> IO Value
getRepo String
hubUrl String
tag Maybe Int
state Maybe Int
event =
String -> String -> String -> Value -> Value -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getRepo" String
tag (Maybe Int -> Value
maybeInt Maybe Int
state) (Maybe Int -> Value
maybeInt Maybe Int
event)
getTag :: String -> Info -> Maybe Int -> IO Struct
getTag :: String -> Info -> Maybe Int -> IO Struct
getTag String
hubUrl Info
info = String -> String -> Value -> () -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getTag" (Info -> Value
infoValue Info
info) () (Value -> IO Struct)
-> (Maybe Int -> Value) -> Maybe Int -> IO Struct
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe Int -> Value
maybeInt
getTagExternalRepos :: String -> Maybe Info -> Maybe Info -> Maybe Int -> IO Struct
getTagExternalRepos :: String -> Maybe Info -> Maybe Info -> Maybe Int -> IO Struct
getTagExternalRepos String
hubUrl Maybe Info
taginfo Maybe Info
repoinfo Maybe Int
event =
String -> String -> Value -> Value -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getTagExternalRepos" (Maybe Info -> Value
maybeInfo Maybe Info
taginfo) (Maybe Info -> Value
maybeInfo Maybe Info
repoinfo) (Maybe Int -> Value
maybeInt Maybe Int
event)
getTagGroups :: String -> String -> Maybe Int -> Bool -> Bool -> Bool -> Bool -> IO Value
getTagGroups :: String
-> String -> Maybe Int -> Bool -> Bool -> Bool -> Bool -> IO Value
getTagGroups String
hubUrl String
tag Maybe Int
event =
String
-> String
-> String
-> Value
-> Bool
-> Bool
-> Bool
-> Bool
-> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getTagGroups" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event)
getTagID :: String -> Info -> IO Value
getTagID :: String -> Info -> IO Value
getTagID String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getTagID" (Value -> IO Value) -> (Info -> Value) -> Info -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Info -> Value
infoValue
getTaskChildren :: String -> Int -> Bool -> IO [Struct]
getTaskChildren :: String -> Int -> Bool -> IO [Struct]
getTaskChildren String
hubUrl = String -> String -> Int -> Bool -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getTaskChildren"
getTaskDescendents :: String -> Int -> Bool -> IO Struct
getTaskDescendents :: String -> Int -> Bool -> IO Struct
getTaskDescendents String
hubUrl = String -> String -> Int -> Bool -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getTaskDescendents"
getTaskInfo :: String
-> Int
-> Bool
-> IO (Maybe Struct)
getTaskInfo :: String -> Int -> Bool -> IO (Maybe Struct)
getTaskInfo String
hubUrl Int
tid Bool
request = Value -> Maybe Struct
maybeStruct (Value -> Maybe Struct) -> IO Value -> IO (Maybe Struct)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> String -> Int -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getTaskInfo" Int
tid Bool
request
getTaskRequest :: String -> Int -> IO Value
getTaskRequest :: String -> Int -> IO Value
getTaskRequest String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getTaskRequest"
getTaskResult :: String -> Int -> IO Value
getTaskResult :: String -> Int -> IO Value
getTaskResult String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getTaskResult"
getUser :: String -> Info -> Bool -> IO (Maybe Struct)
getUser :: String -> Info -> Bool -> IO (Maybe Struct)
getUser String
hubUrl Info
info Bool
krbprncpl =
Value -> Maybe Struct
maybeStruct (Value -> Maybe Struct) -> IO Value -> IO (Maybe Struct)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> String -> String -> Value -> () -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getUser" (Info -> Value
infoValue Info
info) () Bool
krbprncpl
getUserPerms :: String -> Maybe Info -> IO Value
getUserPerms :: String -> Maybe Info -> IO Value
getUserPerms String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getUserPerms" (Value -> IO Value)
-> (Maybe Info -> Value) -> Maybe Info -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe Info -> Value
maybeInfo
getVolume :: String -> Info -> IO Value
getVolume :: String -> Info -> IO Value
getVolume String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getVolume" (Value -> IO Value) -> (Info -> Value) -> Info -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Info -> Value
infoValue
getWinArchive :: String -> Int -> IO Struct
getWinArchive :: String -> Int -> IO Struct
getWinArchive String
hubUrl = String -> String -> Int -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getWinArchive"
getWinBuild :: String -> Info -> IO (Maybe Struct)
getWinBuild :: String -> Info -> IO (Maybe Struct)
getWinBuild String
hubUrl = (Value -> Maybe Struct) -> IO Value -> IO (Maybe Struct)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Value -> Maybe Struct
maybeStruct (IO Value -> IO (Maybe Struct))
-> (Info -> IO Value) -> Info -> IO (Maybe Struct)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"getWinBuild" (Value -> IO Value) -> (Info -> Value) -> Info -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Info -> Value
infoValue
hello :: String -> IO String
hello :: String -> IO String
hello String
hubUrl = String -> String -> IO String
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"hello"
listArchiveFiles :: String -> Int -> IO [Struct]
listArchiveFiles :: String -> Int -> IO [Struct]
listArchiveFiles String
hubUrl = String -> String -> Int -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listArchiveFiles"
listArchives :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe String -> Maybe FilePath -> Maybe Int -> Maybe String -> Maybe Info -> Maybe Int -> Maybe Int -> IO [Struct]
listArchives :: String
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe String
-> Maybe String
-> Maybe Int
-> Maybe String
-> Maybe Info
-> Maybe Int
-> Maybe Int
-> IO [Struct]
listArchives String
hubUrl Maybe Int
buildID Maybe Int
buildrootID Maybe Int
componentBuildrootID Maybe Int
hostID Maybe String
type_ Maybe String
file Maybe Int
size Maybe String
checksum Maybe Info
typeInfo Maybe Int
imageID Maybe Int
archiveID =
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> ()
-> Value
-> Value
-> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listArchives" (Maybe Int -> Value
maybeInt Maybe Int
buildID) (Maybe Int -> Value
maybeInt Maybe Int
buildrootID) (Maybe Int -> Value
maybeInt Maybe Int
componentBuildrootID) (Maybe Int -> Value
maybeInt Maybe Int
hostID) (Maybe String -> Value
maybeString Maybe String
type_) (Maybe String -> Value
maybeString Maybe String
file) (Maybe Int -> Value
maybeInt Maybe Int
size) (Maybe String -> Value
maybeString Maybe String
checksum) (Maybe Info -> Value
maybeInfo Maybe Info
typeInfo) () (Maybe Int -> Value
maybeInt Maybe Int
imageID) (Maybe Int -> Value
maybeInt Maybe Int
archiveID)
listBTypes :: String -> Value -> IO Value
listBTypes :: String -> Value -> IO Value
listBTypes String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listBTypes"
listBuildRPMs :: String -> Int -> IO [Struct]
listBuildRPMs :: String -> Int -> IO [Struct]
listBuildRPMs String
hubUrl = String -> String -> Int -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listBuildRPMs"
listBuildroots :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> IO Value
listBuildroots :: String
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> IO Value
listBuildroots String
hubUrl Maybe Int
hostID Maybe Int
tagID Maybe Int
state Maybe Int
rpmID Maybe Int
archiveID Maybe Int
taskID Maybe Int
buildrootID =
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listBuildroots" (Maybe Int -> Value
maybeInt Maybe Int
hostID) (Maybe Int -> Value
maybeInt Maybe Int
tagID) (Maybe Int -> Value
maybeInt Maybe Int
state) (Maybe Int -> Value
maybeInt Maybe Int
rpmID) (Maybe Int -> Value
maybeInt Maybe Int
archiveID) (Maybe Int -> Value
maybeInt Maybe Int
taskID) (Maybe Int -> Value
maybeInt Maybe Int
buildrootID)
listBuilds :: String -> Struct -> IO [Struct]
listBuilds :: String -> Struct -> IO [Struct]
listBuilds String
hubUrl Struct
args =
let maybeArg :: String -> Value
maybeArg String
fld = Maybe Value -> Value
maybeValue (String -> Struct -> Maybe Value
forall a. XmlRpcType a => String -> Struct -> Maybe a
lookupStruct String
fld Struct
args) in
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listBuilds" (String -> Value
maybeArg String
"packageID") (String -> Value
maybeArg String
"userID") (String -> Value
maybeArg String
"taskID") (String -> Value
maybeArg String
"prefix") (String -> Value
maybeArg String
"state") (String -> Value
maybeArg String
"volumeID") (String -> Value
maybeArg String
"source") (String -> Value
maybeArg String
"createdBefore") (String -> Value
maybeArg String
"createdAfter") (String -> Value
maybeArg String
"completeBefore") (String -> Value
maybeArg String
"completeAfter") (String -> Value
maybeArg String
"type") (String -> Value
maybeArg String
"typeInfo") (String -> Value
maybeArg String
"queryOpts")
listCGs :: String -> IO Struct
listCGs :: String -> IO Struct
listCGs String
hubUrl = String -> String -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listCGs"
listChannels :: String -> Maybe Int -> Maybe Int -> IO Value
listChannels :: String -> Maybe Int -> Maybe Int -> IO Value
listChannels String
hubUrl Maybe Int
hostID Maybe Int
event =
String -> String -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listChannels" (Maybe Int -> Value
maybeInt Maybe Int
hostID) (Maybe Int -> Value
maybeInt Maybe Int
event)
listExternalRepos :: String -> Maybe Info -> Maybe String -> Maybe Int -> IO Value
listExternalRepos :: String -> Maybe Info -> Maybe String -> Maybe Int -> IO Value
listExternalRepos String
hubUrl Maybe Info
info Maybe String
url Maybe Int
event =
String -> String -> Value -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listExternalRepos" (Maybe Info -> Value
maybeInfo Maybe Info
info) (Maybe String -> Value
maybeString Maybe String
url) (Maybe Int -> Value
maybeInt Maybe Int
event)
listHosts :: String -> Maybe Value -> Maybe Int -> Bool -> Bool -> Maybe Int -> IO Value
listHosts :: String
-> Maybe Value
-> Maybe Int
-> Bool
-> Bool
-> Maybe Int
-> IO Value
listHosts String
hubUrl Maybe Value
arches Maybe Int
channelID Bool
ready Bool
enabled Maybe Int
userID =
String
-> String -> Value -> Value -> Bool -> Bool -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listHosts" (Maybe Value -> Value
maybeValue Maybe Value
arches) (Maybe Int -> Value
maybeInt Maybe Int
channelID) Bool
ready Bool
enabled (Maybe Int -> Value
maybeInt Maybe Int
userID)
listPackages :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe String -> Bool -> Bool -> Maybe Int -> IO [Struct]
listPackages :: String
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe String
-> Bool
-> Bool
-> Maybe Int
-> IO [Struct]
listPackages String
hubUrl Maybe Int
tagID Maybe Int
userID Maybe Int
pkgID Maybe String
prefix Bool
inherited Bool
with_dups Maybe Int
event =
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Bool
-> Bool
-> Value
-> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listPackages" (Maybe Int -> Value
maybeInt Maybe Int
tagID) (Maybe Int -> Value
maybeInt Maybe Int
userID) (Maybe Int -> Value
maybeInt Maybe Int
pkgID) (Maybe String -> Value
maybeString Maybe String
prefix) Bool
inherited Bool
with_dups (Maybe Int -> Value
maybeInt Maybe Int
event)
listPackagesSimple :: String -> String
-> IO [Struct]
listPackagesSimple :: String -> String -> IO [Struct]
listPackagesSimple String
hubUrl = String -> String -> String -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listPackagesSimple"
listRPMFiles :: String -> Int -> IO [Struct]
listRPMFiles :: String -> Int -> IO [Struct]
listRPMFiles String
hubUrl = String -> String -> Int -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listRPMFiles"
listRPMs :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Value -> IO [Struct]
listRPMs :: String
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe Value
-> IO [Struct]
listRPMs String
hubUrl Maybe Int
buildID Maybe Int
buildrootID Maybe Int
imageID Maybe Int
componentBuildrootID Maybe Int
hostID Maybe Value
arches =
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listRPMs" (Maybe Int -> Value
maybeInt Maybe Int
buildID) (Maybe Int -> Value
maybeInt Maybe Int
buildrootID) (Maybe Int -> Value
maybeInt Maybe Int
imageID) (Maybe Int -> Value
maybeInt Maybe Int
componentBuildrootID) (Maybe Int -> Value
maybeInt Maybe Int
hostID) (Maybe Value -> Value
maybeValue Maybe Value
arches)
listSideTags :: String -> Maybe Info -> Maybe Info -> IO Value
listSideTags :: String -> Maybe Info -> Maybe Info -> IO Value
listSideTags String
hubUrl Maybe Info
basetag Maybe Info
user = do
String -> String -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listSideTags" (Maybe Info -> Value
maybeInfo Maybe Info
basetag) (Maybe Info -> Value
maybeInfo Maybe Info
user)
listTagged :: String -> String -> Maybe Int -> Bool -> Maybe String -> Bool -> Maybe String -> Maybe String -> Maybe String -> IO [Struct]
listTagged :: String
-> String
-> Maybe Int
-> Bool
-> Maybe String
-> Bool
-> Maybe String
-> Maybe String
-> Maybe String
-> IO [Struct]
listTagged String
hubUrl String
tag Maybe Int
event Bool
inherit Maybe String
prefix Bool
latest Maybe String
package Maybe String
owner Maybe String
type_ =
String
-> String
-> String
-> Value
-> Bool
-> Value
-> Bool
-> Value
-> Value
-> Value
-> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listTagged" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event) Bool
inherit (Maybe String -> Value
maybeString Maybe String
prefix) Bool
latest (Maybe String -> Value
maybeString Maybe String
package) (Maybe String -> Value
maybeString Maybe String
owner) (Maybe String -> Value
maybeString Maybe String
type_)
listTaggedArchives :: String -> String -> Maybe Int -> Bool -> Bool -> Maybe String -> Maybe String -> IO Value
listTaggedArchives :: String
-> String
-> Maybe Int
-> Bool
-> Bool
-> Maybe String
-> Maybe String
-> IO Value
listTaggedArchives String
hubUrl String
tag Maybe Int
event Bool
inherit Bool
latest Maybe String
package Maybe String
type_ =
String
-> String
-> String
-> Value
-> Bool
-> Bool
-> Value
-> Value
-> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listTaggedArchives" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event) Bool
inherit Bool
latest (Maybe String -> Value
maybeString Maybe String
package) (Maybe String -> Value
maybeString Maybe String
type_)
listTaggedRPMS :: String -> String -> Maybe Int -> Bool -> Bool -> Maybe String -> Maybe String -> Bool -> Maybe String -> Maybe String -> IO Value
listTaggedRPMS :: String
-> String
-> Maybe Int
-> Bool
-> Bool
-> Maybe String
-> Maybe String
-> Bool
-> Maybe String
-> Maybe String
-> IO Value
listTaggedRPMS String
hubUrl String
tag Maybe Int
event Bool
inherit Bool
latest Maybe String
package Maybe String
arch Bool
rpmsigs Maybe String
owner Maybe String
type_ =
String
-> String
-> String
-> Value
-> Bool
-> Bool
-> Value
-> Value
-> Bool
-> Value
-> Value
-> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listTaggedRPMS" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event) Bool
inherit Bool
latest (Maybe String -> Value
maybeString Maybe String
package) (Maybe String -> Value
maybeString Maybe String
arch) Bool
rpmsigs (Maybe String -> Value
maybeString Maybe String
owner) (Maybe String -> Value
maybeString Maybe String
type_)
listTags :: String -> Maybe Info -> Maybe Info -> Bool -> IO [Struct]
listTags :: String -> Maybe Info -> Maybe Info -> Bool -> IO [Struct]
listTags String
hubUrl Maybe Info
build Maybe Info
package =
String -> String -> Value -> Value -> Bool -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listTags" (Maybe Info -> Value
maybeInfo Maybe Info
build) (Maybe Info -> Value
maybeInfo Maybe Info
package)
listTaskOutput :: String -> Int -> Bool -> Bool -> Bool -> IO Struct
listTaskOutput :: String -> Int -> Bool -> Bool -> Bool -> IO Struct
listTaskOutput String
hubUrl = String -> String -> Int -> Bool -> Bool -> Bool -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listTaskOutput"
listTasks :: String -> Struct
-> Struct
-> IO [Struct]
listTasks :: String -> Struct -> Struct -> IO [Struct]
listTasks String
hubUrl = String -> String -> Struct -> Struct -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listTasks"
listUsers :: String -> Maybe Int -> Maybe String -> IO [Struct]
listUsers :: String -> Maybe Int -> Maybe String -> IO [Struct]
listUsers String
hubUrl Maybe Int
userType Maybe String
prefix =
String -> String -> Value -> Value -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listUsers" (Maybe Int -> Value
maybeInt Maybe Int
userType) (Maybe String -> Value
maybeString Maybe String
prefix)
listVolumes :: String -> IO Value
listVolumes :: String -> IO Value
listVolumes String
hubUrl = String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"listVolumes"
repoInfo :: String -> Int -> IO Value
repoInfo :: String -> Int -> IO Value
repoInfo String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"repoInfo"
resubmitTask :: String -> Int -> IO Value
resubmitTask :: String -> Int -> IO Value
resubmitTask String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"resubmitTask"
tagChangedSinceEvent :: String -> Int -> Value -> IO Bool
tagChangedSinceEvent :: String -> Int -> Value -> IO Bool
tagChangedSinceEvent String
hubUrl = String -> String -> Int -> Value -> IO Bool
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"tagChangedSinceEvent"
tagHistory :: String -> Maybe Info -> Maybe Info -> Maybe Info -> Bool -> IO Value
tagHistory :: String
-> Maybe Info -> Maybe Info -> Maybe Info -> Bool -> IO Value
tagHistory String
hubUrl Maybe Info
build Maybe Info
tag Maybe Info
package =
String -> String -> Value -> Value -> Value -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"tagHistory" (Maybe Info -> Value
maybeInfo Maybe Info
build) (Maybe Info -> Value
maybeInfo Maybe Info
tag) (Maybe Info -> Value
maybeInfo Maybe Info
package)
taskFinished :: String -> Int -> IO Bool
taskFinished :: String -> Int -> IO Bool
taskFinished String
hubUrl = String -> String -> Int -> IO Bool
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"taskFinished"
taskReport :: String -> Maybe String -> IO Value
taskReport :: String -> Maybe String -> IO Value
taskReport String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl String
"taskReport" (Value -> IO Value)
-> (Maybe String -> Value) -> Maybe String -> IO Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Maybe String -> Value
maybeString
lookupStruct :: XmlRpcType a => String -> Struct -> Maybe a
lookupStruct :: String -> Struct -> Maybe a
lookupStruct String
key Struct
struct =
(String -> a) -> (a -> a) -> Either String a -> a
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
either String -> a
forall a. HasCallStack => String -> a
error a -> a
forall a. a -> a
id (Either String a -> a) -> Maybe (Either String a) -> Maybe a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> ExceptT String Maybe a -> Maybe (Either String a)
forall e (m :: * -> *) a. ExceptT e m a -> m (Either e a)
runExceptT (String -> Struct -> ExceptT String Maybe a
forall (m :: * -> *) a.
(MonadFail m, XmlRpcType a) =>
String -> Struct -> Err m a
getField String
key Struct
struct)
maybeVal :: String -> Maybe a -> a
maybeVal :: String -> Maybe a -> a
maybeVal String
err = a -> Maybe a -> a
forall a. a -> Maybe a -> a
fromMaybe (String -> a
forall a. HasCallStack => String -> a
error String
err)
getValue :: XmlRpcType a => Value -> Maybe a
getValue :: Value -> Maybe a
getValue = (Either String a -> a) -> Maybe (Either String a) -> Maybe a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ((String -> a) -> (a -> a) -> Either String a -> a
forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
either String -> a
forall a. HasCallStack => String -> a
error a -> a
forall a. a -> a
id) (Maybe (Either String a) -> Maybe a)
-> (Value -> Maybe (Either String a)) -> Value -> Maybe a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ExceptT String Maybe a -> Maybe (Either String a)
forall e (m :: * -> *) a. ExceptT e m a -> m (Either e a)
runExceptT (ExceptT String Maybe a -> Maybe (Either String a))
-> (Value -> ExceptT String Maybe a)
-> Value
-> Maybe (Either String a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Value -> ExceptT String Maybe a
forall a (m :: * -> *).
(XmlRpcType a, MonadFail m) =>
Value -> Err m a
fromValue