module Distribution.Koji.API
( 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
, 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 i :: Int
i) = Int -> Value
ValueInt Int
i
infoValue (InfoString s :: 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 st :: Struct
st) = Struct -> Maybe Struct
forall a. a -> Maybe a
Just Struct
st
maybeStruct _ = Maybe Struct
forall a. Maybe a
Nothing
structArray :: Value -> [Struct]
structArray :: Value -> [Struct]
structArray (ValueArray v :: [Value]
v) = (Value -> Maybe Struct) -> [Value] -> [Struct]
forall a b. (a -> Maybe b) -> [a] -> [b]
mapMaybe Value -> Maybe Struct
maybeStruct [Value]
v
structArray _ = []
checkTagAccess :: String -> Int -> Int -> IO Value
checkTagAccess :: String -> Int -> Int -> IO Value
checkTagAccess hubUrl :: String
hubUrl = String -> String -> Int -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "checkTagAccess"
checkTagPackage :: String -> Info -> Info -> IO Bool
checkTagPackage :: String -> Info -> Info -> IO Bool
checkTagPackage hubUrl :: String
hubUrl taginfo :: Info
taginfo pkginfo :: Info
pkginfo = String -> String -> Value -> Value -> IO Bool
forall a. Remote a => String -> String -> a
koji String
hubUrl "checkTagPackage" (Info -> Value
infoValue Info
taginfo) (Info -> Value
infoValue Info
pkginfo)
getAPIVersion :: String -> IO String
getAPIVersion :: String -> IO String
getAPIVersion hubUrl :: String
hubUrl = String -> String -> IO String
forall a. Remote a => String -> String -> a
koji String
hubUrl "getAPIVersion"
getActiveRepos :: String -> IO Value
getActiveRepos :: String -> IO Value
getActiveRepos hubUrl :: String
hubUrl = String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getActiveRepos"
getAllArches :: String -> IO Value
getAllArches :: String -> IO Value
getAllArches hubUrl :: String
hubUrl = String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getAllArches"
getAllPerms :: String -> IO [Struct]
getAllPerms :: String -> IO [Struct]
getAllPerms hubUrl :: String
hubUrl = String -> String -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "getAllPerms"
getArchive :: String -> Int -> IO (Maybe Struct)
getArchive :: String -> Int -> IO (Maybe Struct)
getArchive hubUrl :: 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 "getArchive"
getArchiveFile :: String -> Int -> FilePath -> IO (Maybe Struct)
getArchiveFile :: String -> Int -> String -> IO (Maybe Struct)
getArchiveFile hubUrl :: String
hubUrl archiveID :: Int
archiveID file :: 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 "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 hubUrl :: String
hubUrl filename :: Maybe String
filename type_name :: Maybe String
type_name type_id :: Maybe Int
type_id =
String -> String -> Value -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getArchiveTypes"
getAverageBuildDuration :: String -> Info -> IO Value
getAverageBuildDuration :: String -> Info -> IO Value
getAverageBuildDuration hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: 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 "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 hubUrl :: String
hubUrl = String -> String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getBuildConfig"
getBuildLogs :: String -> Info
-> IO Value
getBuildLogs :: String -> Info -> IO Value
getBuildLogs hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl info :: Maybe Info
info event :: Maybe Int
event buildTagId :: Maybe Int
buildTagId destTagId :: Maybe Int
destTagId =
String -> String -> Value -> Value -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getBuildroot"
getBuildrootListing :: String -> Int -> IO Value
getBuildrootListing :: String -> Int -> IO Value
getBuildrootListing hubUrl :: String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl buildID :: Maybe Int
buildID taskID :: Maybe Int
taskID filepath :: Maybe String
filepath author :: Maybe String
author before :: Maybe String
before after :: Maybe String
after =
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Int -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "getEvent"
getExternalRepo :: String -> Info -> Maybe Int -> IO Struct
getExternalRepo :: String -> Info -> Maybe Int -> IO Struct
getExternalRepo hubUrl :: String
hubUrl info :: Info
info event :: Maybe Int
event =
String -> String -> Value -> () -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl info :: Info
info event :: Maybe Int
event =
String -> String -> Value -> Value -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl tag :: String
tag event :: Maybe Int
event =
String -> String -> String -> Value -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getFullInheritance" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event)
getGlobalInheritance :: String -> Maybe Int -> IO Value
getGlobalInheritance :: String -> Maybe Int -> IO Value
getGlobalInheritance hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getGroupMembers"
getHost :: String -> Info -> Maybe Int -> IO Struct
getHost :: String -> Info -> Maybe Int -> IO Struct
getHost hubUrl :: String
hubUrl info :: Info
info = String -> String -> Value -> () -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Int -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "getImageArchive"
getImageBuild :: String -> Info -> IO Struct
getImageBuild :: String -> Info -> IO Struct
getImageBuild hubUrl :: String
hubUrl info :: Info
info = String -> String -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "getImageBuild" (Info -> Value
infoValue Info
info)
getInheritanceData :: String -> String -> Maybe Int -> IO Value
getInheritanceData :: String -> String -> Maybe Int -> IO Value
getInheritanceData hubUrl :: String
hubUrl tag :: String
tag event :: Maybe Int
event =
String -> String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getInheritanceData" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event)
getLastEvent :: String -> Maybe Int -> IO Value
getLastEvent :: String -> Maybe Int -> IO Value
getLastEvent hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getLastHostUpdate"
getLatestBuilds :: String
-> Info
-> Maybe Int
-> Maybe String
-> Maybe String
-> IO [Struct]
getLatestBuilds :: String
-> Info -> Maybe Int -> Maybe String -> Maybe String -> IO [Struct]
getLatestBuilds hubUrl :: String
hubUrl tag :: Info
tag event :: Maybe Int
event pkg :: Maybe String
pkg type_ :: Maybe String
type_ =
String -> String -> Value -> Value -> Value -> Value -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl tag :: String
tag event :: Maybe Int
event =
String -> String -> String -> Value -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl tag :: String
tag pkg :: Maybe String
pkg arch :: Maybe String
arch event :: Maybe Int
event rpmsigs :: Bool
rpmsigs type_ :: Maybe String
type_ =
String
-> String
-> String
-> Value
-> Value
-> Value
-> Bool
-> Value
-> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Int -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "getMavenArchive"
getMavenBuild :: String -> Info -> IO Struct
getMavenBuild :: String -> Info -> IO Struct
getMavenBuild hubUrl :: String
hubUrl info :: Info
info = String -> String -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "getMavenBuild" (Info -> Value
infoValue Info
info)
getNextRelease :: String -> Info -> IO Value
getNextRelease :: String -> Info -> IO Value
getNextRelease hubUrl :: String
hubUrl info :: Info
info = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getNextRelease" (Info -> Value
infoValue Info
info)
getPackage :: String -> Info -> IO Value
getPackage :: String -> Info -> IO Value
getPackage hubUrl :: String
hubUrl info :: Info
info = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getPackage" (Info -> Value
infoValue Info
info)
getPackageConfig :: String -> String -> String -> Maybe Int -> IO Value
getPackageConfig :: String -> String -> String -> Maybe Int -> IO Value
getPackageConfig hubUrl :: String
hubUrl tag :: String
tag pkg :: String
pkg event :: Maybe Int
event =
String -> String -> String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl pkg :: String
pkg = do
Value
res <- String -> String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getPackageID" String
pkg
case Value
res of
ValueInt i :: 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
_ -> 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 hubUrl :: String
hubUrl = String -> String -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl rpmid :: Int
rpmid deptype :: Maybe String
deptype =
String -> String -> Int -> Value -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "getRPMDeps" Int
rpmid (Maybe String -> Value
maybeString Maybe String
deptype)
getRPMFile :: String -> Int -> FilePath -> IO Struct
getRPMFile :: String -> Int -> String -> IO Struct
getRPMFile hubUrl :: String
hubUrl = String -> String -> Int -> String -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "getRPMFile"
getRPMHeaders :: String -> Maybe Int -> Maybe Int -> Maybe FilePath -> Maybe Value -> IO Struct
hubUrl :: String
hubUrl rpmid :: Maybe Int
rpmid taskid :: Maybe Int
taskid file :: Maybe String
file headers :: Maybe Value
headers =
String -> String -> Value -> Value -> Value -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl tag :: String
tag state :: Maybe Int
state event :: Maybe Int
event =
String -> String -> String -> Value -> Value -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl info :: Info
info = String -> String -> Value -> () -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl taginfo :: Maybe Info
taginfo repoinfo :: Maybe Info
repoinfo event :: Maybe Int
event =
String -> String -> Value -> Value -> Value -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl tag :: String
tag event :: Maybe Int
event =
String
-> String
-> String
-> Value
-> Bool
-> Bool
-> Bool
-> Bool
-> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getTagGroups" String
tag (Maybe Int -> Value
maybeInt Maybe Int
event)
getTagID :: String -> Info -> IO (Maybe Int)
getTagID :: String -> Info -> IO (Maybe Int)
getTagID hubUrl :: String
hubUrl tag :: Info
tag = do
Value
res <- String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getTagID" (Info -> Value
infoValue Info
tag)
case Value
res of
ValueInt i :: 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
_ -> Maybe Int -> IO (Maybe Int)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Int
forall a. Maybe a
Nothing
getTaskChildren :: String -> Int -> Bool -> IO [Struct]
getTaskChildren :: String -> Int -> Bool -> IO [Struct]
getTaskChildren hubUrl :: String
hubUrl = String -> String -> Int -> Bool -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "getTaskChildren"
getTaskDescendents :: String -> Int -> Bool -> IO Struct
getTaskDescendents :: String -> Int -> Bool -> IO Struct
getTaskDescendents hubUrl :: String
hubUrl = String -> String -> Int -> Bool -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "getTaskDescendents"
getTaskInfo :: String
-> Int
-> Bool
-> IO (Maybe Struct)
getTaskInfo :: String -> Int -> Bool -> IO (Maybe Struct)
getTaskInfo hubUrl :: String
hubUrl tid :: Int
tid request :: 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 "getTaskInfo" Int
tid Bool
request
getTaskRequest :: String -> Int -> IO Value
getTaskRequest :: String -> Int -> IO Value
getTaskRequest hubUrl :: String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getTaskRequest"
getTaskResult :: String -> Int -> IO Value
getTaskResult :: String -> Int -> IO Value
getTaskResult hubUrl :: String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "getTaskResult"
getUser :: String -> Info -> Bool -> IO (Maybe Struct)
getUser :: String -> Info -> Bool -> IO (Maybe Struct)
getUser hubUrl :: String
hubUrl info :: Info
info krbprncpl :: 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 "getUser" (Info -> Value
infoValue Info
info) () Bool
krbprncpl
getUserPerms :: String -> Maybe Info -> IO Value
getUserPerms :: String -> Maybe Info -> IO Value
getUserPerms hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Int -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "getWinArchive"
getWinBuild :: String -> Info -> IO (Maybe Struct)
getWinBuild :: String -> Info -> IO (Maybe Struct)
getWinBuild hubUrl :: 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 "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 hubUrl :: String
hubUrl = String -> String -> IO String
forall a. Remote a => String -> String -> a
koji String
hubUrl "hello"
listArchiveFiles :: String -> Int -> IO [Struct]
listArchiveFiles :: String -> Int -> IO [Struct]
listArchiveFiles hubUrl :: String
hubUrl = String -> String -> Int -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl buildID :: Maybe Int
buildID buildrootID :: Maybe Int
buildrootID componentBuildrootID :: Maybe Int
componentBuildrootID hostID :: Maybe Int
hostID type_ :: Maybe String
type_ file :: Maybe String
file size :: Maybe Int
size checksum :: Maybe String
checksum typeInfo :: Maybe Info
typeInfo imageID :: Maybe Int
imageID archiveID :: 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 "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 hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "listBTypes"
listBuildRPMs :: String -> Int -> IO [Struct]
listBuildRPMs :: String -> Int -> IO [Struct]
listBuildRPMs hubUrl :: String
hubUrl = String -> String -> Int -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl hostID :: Maybe Int
hostID tagID :: Maybe Int
tagID state :: Maybe Int
state rpmID :: Maybe Int
rpmID archiveID :: Maybe Int
archiveID taskID :: Maybe Int
taskID buildrootID :: Maybe Int
buildrootID =
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl args :: Struct
args =
let maybeArg :: String -> Value
maybeArg fld :: String
fld = Maybe Value -> Value
maybeValue (String -> Struct -> Maybe Value
forall a. XmlRpcType a => String -> Struct -> Maybe a
lookupStruct String
fld Struct
args)
in case String -> Value
maybeArg "pattern" of
ValueNil ->
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 "listBuilds" (String -> Value
maybeArg "packageID") (String -> Value
maybeArg "userID") (String -> Value
maybeArg "taskID") (String -> Value
maybeArg "prefix") (String -> Value
maybeArg "state") (String -> Value
maybeArg "volumeID") (String -> Value
maybeArg "source") (String -> Value
maybeArg "createdBefore") (String -> Value
maybeArg "createdAfter") (String -> Value
maybeArg "completeBefore") (String -> Value
maybeArg "completeAfter") (String -> Value
maybeArg "type") (String -> Value
maybeArg "typeInfo") (String -> Value
maybeArg "queryOpts")
pat :: Value
pat -> String
-> String
-> Value
-> 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 "listBuilds" (String -> Value
maybeArg "packageID") (String -> Value
maybeArg "userID") (String -> Value
maybeArg "taskID") (String -> Value
maybeArg "prefix") (String -> Value
maybeArg "state") (String -> Value
maybeArg "volumeID") (String -> Value
maybeArg "source") (String -> Value
maybeArg "createdBefore") (String -> Value
maybeArg "createdAfter") (String -> Value
maybeArg "completeBefore") (String -> Value
maybeArg "completeAfter") (String -> Value
maybeArg "type") (String -> Value
maybeArg "typeInfo") (String -> Value
maybeArg "queryOpts") Value
pat
listCGs :: String -> IO Struct
listCGs :: String -> IO Struct
listCGs hubUrl :: String
hubUrl = String -> String -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "listCGs"
listChannels :: String -> Maybe Int -> Maybe Int -> IO Value
listChannels :: String -> Maybe Int -> Maybe Int -> IO Value
listChannels hubUrl :: String
hubUrl hostID :: Maybe Int
hostID event :: Maybe Int
event =
String -> String -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl info :: Maybe Info
info url :: Maybe String
url event :: Maybe Int
event =
String -> String -> Value -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl arches :: Maybe Value
arches channelID :: Maybe Int
channelID ready :: Bool
ready enabled :: Bool
enabled userID :: Maybe Int
userID =
String
-> String -> Value -> Value -> Bool -> Bool -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl tagID :: Maybe Int
tagID userID :: Maybe Int
userID pkgID :: Maybe Int
pkgID prefix :: Maybe String
prefix inherited :: Bool
inherited with_dups :: Bool
with_dups event :: Maybe Int
event =
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Bool
-> Bool
-> Value
-> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> String -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "listPackagesSimple"
listRPMFiles :: String -> Int -> IO [Struct]
listRPMFiles :: String -> Int -> IO [Struct]
listRPMFiles hubUrl :: String
hubUrl = String -> String -> Int -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl buildID :: Maybe Int
buildID buildrootID :: Maybe Int
buildrootID imageID :: Maybe Int
imageID componentBuildrootID :: Maybe Int
componentBuildrootID hostID :: Maybe Int
hostID arches :: Maybe Value
arches =
String
-> String
-> Value
-> Value
-> Value
-> Value
-> Value
-> Value
-> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl basetag :: Maybe Info
basetag user :: Maybe Info
user = do
String -> String -> Value -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl tag :: String
tag event :: Maybe Int
event inherit :: Bool
inherit prefix :: Maybe String
prefix latest :: Bool
latest package :: Maybe String
package owner :: Maybe String
owner type_ :: 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 "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 hubUrl :: String
hubUrl tag :: String
tag event :: Maybe Int
event inherit :: Bool
inherit latest :: Bool
latest package :: Maybe String
package type_ :: Maybe String
type_ =
String
-> String
-> String
-> Value
-> Bool
-> Bool
-> Value
-> Value
-> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl tag :: String
tag event :: Maybe Int
event inherit :: Bool
inherit latest :: Bool
latest package :: Maybe String
package arch :: Maybe String
arch rpmsigs :: Bool
rpmsigs owner :: Maybe String
owner type_ :: 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 "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 hubUrl :: String
hubUrl build :: Maybe Info
build package :: Maybe Info
package =
String -> String -> Value -> Value -> Bool -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Int -> Bool -> Bool -> Bool -> IO Struct
forall a. Remote a => String -> String -> a
koji String
hubUrl "listTaskOutput"
listTasks :: String -> Struct
-> Struct
-> IO [Struct]
listTasks :: String -> Struct -> Struct -> IO [Struct]
listTasks hubUrl :: String
hubUrl = String -> String -> Struct -> Struct -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "listTasks"
listUsers :: String -> Maybe Int -> Maybe String -> IO [Struct]
listUsers :: String -> Maybe Int -> Maybe String -> IO [Struct]
listUsers hubUrl :: String
hubUrl userType :: Maybe Int
userType prefix :: Maybe String
prefix =
String -> String -> Value -> Value -> IO [Struct]
forall a. Remote a => String -> String -> a
koji String
hubUrl "listUsers" (Maybe Int -> Value
maybeInt Maybe Int
userType) (Maybe String -> Value
maybeString Maybe String
prefix)
listVolumes :: String -> IO Value
listVolumes :: String -> IO Value
listVolumes hubUrl :: String
hubUrl = String -> String -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "listVolumes"
repoInfo :: String -> Int -> IO Value
repoInfo :: String -> Int -> IO Value
repoInfo hubUrl :: String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "repoInfo"
resubmitTask :: String -> Int -> IO Value
resubmitTask :: String -> Int -> IO Value
resubmitTask hubUrl :: String
hubUrl = String -> String -> Int -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "resubmitTask"
tagChangedSinceEvent :: String -> Int -> Value -> IO Bool
tagChangedSinceEvent :: String -> Int -> Value -> IO Bool
tagChangedSinceEvent hubUrl :: String
hubUrl = String -> String -> Int -> Value -> IO Bool
forall a. Remote a => String -> String -> a
koji String
hubUrl "tagChangedSinceEvent"
tagHistory :: String -> Maybe Info -> Maybe Info -> Maybe Info -> Bool -> IO Value
tagHistory :: String
-> Maybe Info -> Maybe Info -> Maybe Info -> Bool -> IO Value
tagHistory hubUrl :: String
hubUrl build :: Maybe Info
build tag :: Maybe Info
tag package :: Maybe Info
package =
String -> String -> Value -> Value -> Value -> Bool -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 hubUrl :: String
hubUrl = String -> String -> Int -> IO Bool
forall a. Remote a => String -> String -> a
koji String
hubUrl "taskFinished"
taskReport :: String -> Maybe String -> IO Value
taskReport :: String -> Maybe String -> IO Value
taskReport hubUrl :: String
hubUrl = String -> String -> Value -> IO Value
forall a. Remote a => String -> String -> a
koji String
hubUrl "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 key :: String
key struct :: 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)
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