Safe Haskell | None |
---|---|
Language | Haskell2010 |
Low level XMLRPC API based directly on the python API since that is the only available reference documentation: https://koji.fedoraproject.org/koji/api.
Note that many of the procedures in this module are untested and experimental: particularly most of those that return a Value.
Higher level wrapper procedures live in Distribution.Koji.
Fixes and enhancements welcome.
Synopsis
- data Info
- = InfoID Int
- | InfoString String
- koji :: Remote a => String -> String -> a
- hello :: String -> IO String
- checkTagAccess :: String -> Int -> Int -> IO Value
- checkTagPackage :: String -> Info -> Info -> IO Bool
- getAPIVersion :: String -> IO String
- getActiveRepos :: String -> IO Value
- getAllArches :: String -> IO Value
- getAllPerms :: String -> IO [Struct]
- getArchive :: String -> Int -> IO (Maybe Struct)
- getArchiveFile :: String -> Int -> FilePath -> IO (Maybe Struct)
- getArchiveType :: String -> Maybe FilePath -> Maybe String -> Maybe Int -> IO Value
- getArchiveTypes :: String -> IO Value
- getAverageBuildDuration :: String -> Info -> IO Value
- getBuild :: String -> Info -> IO (Maybe Struct)
- getBuildConfig :: String -> String -> IO Value
- getBuildLogs :: String -> Info -> IO Value
- getBuildTarget :: String -> String -> IO Value
- getBuildTargets :: String -> Maybe Info -> Maybe Int -> Maybe Int -> Maybe Int -> IO Value
- getBuildType :: String -> Info -> IO Value
- getBuildroot :: String -> Int -> IO Value
- getBuildrootListing :: String -> Int -> IO Value
- getChangelogEntries :: String -> Maybe Int -> Maybe Int -> Maybe FilePath -> Maybe String -> Maybe String -> Maybe String -> IO [Struct]
- getChannel :: String -> Info -> IO Value
- getEvent :: String -> Int -> IO Struct
- getExternalRepo :: String -> Info -> Maybe Int -> IO Struct
- getExternalRepoList :: String -> Info -> Maybe Int -> IO [Struct]
- getFullInheritance :: String -> String -> Maybe Int -> Bool -> IO Value
- getGlobalInheritance :: String -> Maybe Int -> IO Value
- getGroupMembers :: String -> String -> IO Value
- getHost :: String -> Info -> Maybe Int -> IO Struct
- getImageArchive :: String -> Int -> IO Struct
- getImageBuild :: String -> Info -> IO Struct
- getInheritanceData :: String -> String -> Maybe Int -> IO Value
- getLastEvent :: String -> Maybe Int -> IO Value
- getLastHostUpdate :: String -> Int -> IO Value
- getLatestBuilds :: String -> Info -> Maybe Int -> Maybe String -> Maybe String -> IO [Struct]
- getLatestMavenArchives :: String -> String -> Maybe Int -> Bool -> IO Value
- getLatestRPMS :: String -> String -> Maybe String -> Maybe String -> Maybe Int -> Bool -> Maybe String -> IO Value
- getMavenArchive :: String -> Int -> IO Struct
- getMavenBuild :: String -> Info -> IO Struct
- getNextRelease :: String -> Info -> IO Value
- getPackage :: String -> Info -> IO Value
- getPackageConfig :: String -> String -> String -> Maybe Int -> IO Value
- getPackageID :: String -> String -> IO (Maybe Int)
- getRPM :: String -> Info -> IO Struct
- getRPMDeps :: String -> Int -> Maybe String -> IO [Struct]
- getRPMFile :: String -> Int -> FilePath -> IO Struct
- getRPMHeaders :: String -> Maybe Int -> Maybe Int -> Maybe FilePath -> Maybe Value -> IO Struct
- getRepo :: String -> String -> Maybe Int -> Maybe Int -> Bool -> IO Value
- getTag :: String -> Info -> Maybe Int -> IO Struct
- getTagExternalRepos :: String -> Maybe Info -> Maybe Info -> Maybe Int -> IO Struct
- getTagGroups :: String -> String -> Maybe Int -> Bool -> Bool -> Bool -> Bool -> IO Value
- getTagID :: String -> Info -> IO (Maybe Int)
- getTaskChildren :: String -> Int -> Bool -> IO [Struct]
- getTaskDescendents :: String -> Int -> Bool -> IO Struct
- getTaskInfo :: String -> Int -> Bool -> IO (Maybe Struct)
- getTaskRequest :: String -> Int -> IO Value
- getTaskResult :: String -> Int -> IO Value
- getUser :: String -> Info -> Bool -> IO (Maybe Struct)
- getUserPerms :: String -> Maybe Info -> IO Value
- getVolume :: String -> Info -> IO Value
- getWinArchive :: String -> Int -> IO Struct
- getWinBuild :: String -> Info -> IO (Maybe Struct)
- listArchiveFiles :: String -> Int -> IO [Struct]
- 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]
- listBTypes :: String -> Value -> IO Value
- listBuildRPMs :: String -> Int -> IO [Struct]
- listBuildroots :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> IO Value
- listBuilds :: String -> Struct -> IO [Struct]
- listCGs :: String -> IO Struct
- listChannels :: String -> Maybe Int -> Maybe Int -> IO Value
- listExternalRepos :: String -> Maybe Info -> Maybe String -> Maybe Int -> IO Value
- listHosts :: String -> Maybe Value -> Maybe Int -> Bool -> Bool -> Maybe Int -> IO Value
- listPackages :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe String -> Bool -> Bool -> Maybe Int -> IO [Struct]
- listPackagesSimple :: String -> String -> IO [Struct]
- listRPMFiles :: String -> Int -> IO [Struct]
- listRPMs :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Value -> IO [Struct]
- listSideTags :: String -> Maybe Info -> Maybe Info -> IO Value
- listTagged :: String -> String -> Maybe Int -> Bool -> Maybe String -> Bool -> Maybe String -> Maybe String -> Maybe String -> IO [Struct]
- listTaggedArchives :: String -> String -> Maybe Int -> Bool -> 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
- listTags :: String -> Maybe Info -> Maybe Info -> Bool -> IO [Struct]
- listTaskOutput :: String -> Int -> Bool -> Bool -> Bool -> IO Struct
- listTasks :: String -> Struct -> Struct -> IO [Struct]
- listUsers :: String -> Maybe Int -> Maybe String -> IO [Struct]
- listVolumes :: String -> IO Value
- repoInfo :: String -> Int -> IO Value
- resubmitTask :: String -> Int -> IO Value
- tagChangedSinceEvent :: String -> Int -> Value -> IO Bool
- tagHistory :: String -> Maybe Info -> Maybe Info -> Maybe Info -> Bool -> IO Value
- taskFinished :: String -> Int -> IO Bool
- taskReport :: String -> Maybe String -> IO Value
- data Value
- = ValueInt Int
- | ValueBool Bool
- | ValueString String
- | ValueUnwrapped String
- | ValueDouble Double
- | ValueDateTime LocalTime
- | ValueBase64 ByteString
- | ValueStruct [(String, Value)]
- | ValueArray [Value]
- | ValueNil
- type Struct = [(String, Value)]
- lookupStruct :: XmlRpcType a => String -> Struct -> Maybe a
- maybeStruct :: Value -> Maybe Struct
- structArray :: Value -> [Struct]
- getValue :: XmlRpcType a => Value -> Maybe a
Documentation
:: Remote a | |
=> String | kojihub url |
-> String | command |
-> a |
Low-level variadic XML RPC call to a Koji Hub
checkTagAccess :: String -> Int -> Int -> IO Value Source #
checkTagAccess(tag_id, user_id=None)
checkTagPackage :: String -> Info -> Info -> IO Bool Source #
checkTagPackage(tag, pkg)
getAPIVersion :: String -> IO String Source #
getAPIVersion()
getActiveRepos :: String -> IO Value Source #
getActiveRepos()
getAllArches :: String -> IO Value Source #
getAllArches
getAllPerms :: String -> IO [Struct] Source #
getAllPerms
getArchive :: String -> Int -> IO (Maybe Struct) Source #
getArchive(archive_id, strict=False)
getArchiveFile :: String -> Int -> FilePath -> IO (Maybe Struct) Source #
getArchiveFile(archive_id, filename, strict=False)
getArchiveType :: String -> Maybe FilePath -> Maybe String -> Maybe Int -> IO Value Source #
getArchiveType(filename=None, type_name=None, type_id=None, strict=False)
getArchiveTypes :: String -> IO Value Source #
getArchiveTypes()
getAverageBuildDuration :: String -> Info -> IO Value Source #
getAverageBuildDuration pkginfo
getBuildConfig :: String -> String -> IO Value Source #
getBuildConfig tag
getBuildTarget :: String -> String -> IO Value Source #
getBuildTarget info
getBuildTargets :: String -> Maybe Info -> Maybe Int -> Maybe Int -> Maybe Int -> IO Value Source #
getBuildTargets info event buildTagID destTagID
getBuildroot :: String -> Int -> IO Value Source #
getBuildroot buildrootId
getBuildrootListing :: String -> Int -> IO Value Source #
getBuildrootListing buildrootId
:: String | |
-> Maybe Int | buildID |
-> Maybe Int | taskID |
-> Maybe FilePath | |
-> Maybe String | author |
-> Maybe String | before |
-> Maybe String | after |
-> IO [Struct] |
getChangelogEntries(buildID=None, taskID=None, filepath=None, author=None, before=None, after=None, queryOpts=None)
getChannel :: String -> Info -> IO Value Source #
getChannel channelinfo
getExternalRepo :: String -> Info -> Maybe Int -> IO Struct Source #
getExternalRepo info
getExternalRepoList :: String -> Info -> Maybe Int -> IO [Struct] Source #
getExternalRepoList(tag_info, event=None)
getFullInheritance :: String -> String -> Maybe Int -> Bool -> IO Value Source #
getFullInheritance(tag, event=None, reverse=False, stops=None, jumps=None)
getGlobalInheritance :: String -> Maybe Int -> IO Value Source #
getGlobalInheritance(event=None)
getGroupMembers :: String -> String -> IO Value Source #
getGroupMembers(group)
getHost :: String -> Info -> Maybe Int -> IO Struct Source #
getHost(hostInfo, strict=False, event=None)
getImageArchive :: String -> Int -> IO Struct Source #
getImageArchive(archive_id, strict=False)
getImageBuild :: String -> Info -> IO Struct Source #
getImageBuild(buildInfo, strict=False)
getInheritanceData :: String -> String -> Maybe Int -> IO Value Source #
getInheritanceData(tag, event=None)
getLastEvent :: String -> Maybe Int -> IO Value Source #
getLastEvent(before=None)
getLastHostUpdate :: String -> Int -> IO Value Source #
getLastHostUpdate(hostID)
getLatestBuilds(tag, event=None, package=None, type=None)
List latest builds for tag (inheritance enabled)
getLatestMavenArchives :: String -> String -> Maybe Int -> Bool -> IO Value Source #
getLatestMavenArchives(tag, event=None, inherit=True)
getLatestRPMS :: String -> String -> Maybe String -> Maybe String -> Maybe Int -> Bool -> Maybe String -> IO Value Source #
getLatestRPMS(tag, package=None, arch=None, event=None, rpmsigs=False, type=None)
getMavenArchive :: String -> Int -> IO Struct Source #
getMavenArchive(archive_id, strict=False)
getMavenBuild :: String -> Info -> IO Struct Source #
getMavenBuild(buildInfo, strict=False)
getNextRelease :: String -> Info -> IO Value Source #
getNextRelease(build_info)
find the last successful or deleted build of this N-V. If building is specified, skip also builds in progress
getPackage :: String -> Info -> IO Value Source #
getPackage(info, strict=False, create=False)
Get the id,name for package
getPackageConfig :: String -> String -> String -> Maybe Int -> IO Value Source #
getPackageConfig(tag, pkg, event=None)
Get config for package in tag
getPackageID :: String -> String -> IO (Maybe Int) Source #
getPackageID(name, strict=False)
Get package ID by name.
getRPMDeps :: String -> Int -> Maybe String -> IO [Struct] Source #
getRPMDeps(rpmID, depType=None, queryOpts=None, strict=False)
getRPMFile :: String -> Int -> FilePath -> IO Struct Source #
getRPMFile(rpmID, filename, strict=False)
getRPMHeaders :: String -> Maybe Int -> Maybe Int -> Maybe FilePath -> Maybe Value -> IO Struct Source #
getRPMHeaders(rpmID=None, taskID=None, filepath=None, headers=None)
getRepo :: String -> String -> Maybe Int -> Maybe Int -> Bool -> IO Value Source #
getRepo(tag, state=None, event=None, dist=False)
getTag :: String -> Info -> Maybe Int -> IO Struct Source #
getTag(tagInfo, strict=False, event=None)
getTagExternalRepos :: String -> Maybe Info -> Maybe Info -> Maybe Int -> IO Struct Source #
getTagExternalRepos(tag_info=None, repo_info=None, event=None)
getTagGroups :: String -> String -> Maybe Int -> Bool -> Bool -> Bool -> Bool -> IO Value Source #
getTagGroups(tag, event=None, inherit=True, incl_pkgs=True, incl_reqs=True, incl_blocked=False)
getTaskChildren :: String -> Int -> Bool -> IO [Struct] Source #
getTaskChildren(task_id, request=False, strict=False)
getTaskDescendents :: String -> Int -> Bool -> IO Struct Source #
getTaskDescendents(task_id, request=False)
:: String | |
-> Int | |
-> Bool | include request details |
-> IO (Maybe Struct) |
getTaskInfo(task_id, request=False, strict=False)
getTaskRequest :: String -> Int -> IO Value Source #
getTaskRequest(taskId)
getTaskResult :: String -> Int -> IO Value Source #
getTaskResult(taskId, raise_fault=True)
getUser :: String -> Info -> Bool -> IO (Maybe Struct) Source #
getUser(userInfo=None, strict=False, krb_princs=True)
getUserPerms :: String -> Maybe Info -> IO Value Source #
getUserPerms(userID=None)
getWinArchive :: String -> Int -> IO Struct Source #
getWinArchive(archive_id, strict=False)
getWinBuild :: String -> Info -> IO (Maybe Struct) Source #
getWinBuild(buildInfo, strict=False)
listArchiveFiles :: String -> Int -> IO [Struct] Source #
listArchiveFiles(archive_id, queryOpts=None, strict=False)
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] Source #
listArchives(buildID=None, buildrootID=None, componentBuildrootID=None, hostID=None, type=None, filename=None, size=None, checksum=None, typeInfo=None, queryOpts=None, imageID=None, archiveID=None, strict=False)
listBTypes :: String -> Value -> IO Value Source #
listBTypes(query=None, queryOpts=None)
listBuildRPMs :: String -> Int -> IO [Struct] Source #
listBuildRPMs(build)
listBuildroots :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> IO Value Source #
listBuildroots(hostID=None, tagID=None, state=None, rpmID=None, archiveID=None, taskID=None, buildrootID=None, queryOpts=None)
listBuilds :: String -> Struct -> IO [Struct] Source #
listBuilds (packageID=None, userID=None, taskID=None, prefix=None, state=None, volumeID=None, source=None, createdBefore=None, createdAfter=None, completeBefore=None, completeAfter=None, type=None, typeInfo=None, queryOpts=None)
listChannels :: String -> Maybe Int -> Maybe Int -> IO Value Source #
listChannels(hostID=None, event=None)
listExternalRepos :: String -> Maybe Info -> Maybe String -> Maybe Int -> IO Value Source #
listExternalRepos(info=None, url=None, event=None, queryOpts=None)
listHosts :: String -> Maybe Value -> Maybe Int -> Bool -> Bool -> Maybe Int -> IO Value Source #
listHosts(arches=None, channelID=None, ready=None, enabled=None, userID=None, queryOpts=None)
listPackages :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe String -> Bool -> Bool -> Maybe Int -> IO [Struct] Source #
listPackages(tagID=None, userID=None, pkgID=None, prefix=None, inherited=False, with_dups=False, event=None, queryOpts=None)
:: String | |
-> String | package name search prefix |
-> IO [Struct] |
listPackagesSimple prefix
listRPMFiles :: String -> Int -> IO [Struct] Source #
listRPMFiles(rpmID, queryOpts=None)
listRPMs :: String -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Value -> IO [Struct] Source #
listRPMs(buildID=None, buildrootID=None, imageID=None, componentBuildrootID=None, hostID=None, arches=None, queryOpts=None)
listSideTags :: String -> Maybe Info -> Maybe Info -> IO Value Source #
listSideTags(basetag=None, user=None, queryOpts=None)
listTagged :: String -> String -> Maybe Int -> Bool -> Maybe String -> Bool -> Maybe String -> Maybe String -> Maybe String -> IO [Struct] Source #
listTagged(tag, event=None, inherit=False, prefix=None, latest=False, package=None, owner=None, type=None)
listTaggedArchives :: String -> String -> Maybe Int -> Bool -> Bool -> Maybe String -> Maybe String -> IO Value Source #
listTaggedArchives(tag, event=None, inherit=False, latest=False, package=None, type=None)
listTaggedRPMS :: String -> String -> Maybe Int -> Bool -> Bool -> Maybe String -> Maybe String -> Bool -> Maybe String -> Maybe String -> IO Value Source #
listTaggedRPMS(tag, event=None, inherit=False, latest=False, package=None, arch=None, rpmsigs=False, owner=None, type=None)
listTags :: String -> Maybe Info -> Maybe Info -> Bool -> IO [Struct] Source #
listTags(build=None, package=None, perms=True, queryOpts=None)
listTaskOutput :: String -> Int -> Bool -> Bool -> Bool -> IO Struct Source #
listTaskOutput(taskID, stat=False, all_volumes=False, strict=False)
listTasks(opts=None, queryOpts=None)
listUsers :: String -> Maybe Int -> Maybe String -> IO [Struct] Source #
listUsers(userType=0, prefix=None, queryOpts=None)
listVolumes :: String -> IO Value Source #
listVolumes()
resubmitTask :: String -> Int -> IO Value Source #
resubmitTask(taskID)
tagChangedSinceEvent :: String -> Int -> Value -> IO Bool Source #
tagChangedSinceEvent(event, taglist)
tagHistory :: String -> Maybe Info -> Maybe Info -> Maybe Info -> Bool -> IO Value Source #
tagHistory(build=None, tag=None, package=None, active=None, queryOpts=None)
taskFinished :: String -> Int -> IO Bool Source #
taskFinished(taskId)
taskReport :: String -> Maybe String -> IO Value Source #
taskReport(owner=None)
ValueInt Int | |
ValueBool Bool | |
ValueString String | |
ValueUnwrapped String | |
ValueDouble Double | |
ValueDateTime LocalTime | |
ValueBase64 ByteString | |
ValueStruct [(String, Value)] | |
ValueArray [Value] | |
ValueNil |
lookupStruct :: XmlRpcType a => String -> Struct -> Maybe a Source #
Lookup a key in a XML result
maybeStruct :: Value -> Maybe Struct Source #
structArray :: Value -> [Struct] Source #