koji-0.0.1: Koji buildsystem XMLRPC API bindings
Safe HaskellNone
LanguageHaskell2010

Distribution.Koji.API

Description

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

Documentation

data Info Source #

info is either an id or string

Constructors

InfoID Int 
InfoString String 

koji Source #

Arguments

:: Remote a 
=> String

kojihub url

-> String

command

-> a 

Low-level variadic XML RPC call to a Koji Hub

hello :: String -> IO String Source #

Say hello to test XMLRPC connection to 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

getBuild Source #

Arguments

:: String 
-> Info

buildID

-> IO (Maybe Struct) 

getBuild(buildInfo, strict=False)

getBuildConfig :: String -> String -> IO Value Source #

getBuildConfig tag

getBuildLogs Source #

Arguments

:: String 
-> Info

buildinfo

-> IO Value 

getBuildLogs build

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

getBuildType Source #

Arguments

:: String 
-> Info

buildinfo

-> IO Value 

getBuildType buildinfo

getBuildroot :: String -> Int -> IO Value Source #

getBuildroot buildrootId

getBuildrootListing :: String -> Int -> IO Value Source #

getBuildrootListing buildrootId

getChangelogEntries Source #

Arguments

:: 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

getEvent :: String -> Int -> IO Struct Source #

getEvent eventid

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 Source #

Arguments

:: String 
-> Info

tag

-> Maybe Int

event

-> Maybe String

pkg

-> Maybe String

type

-> IO [Struct] 

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.

getRPM :: String -> Info -> IO Struct Source #

getRPM(rpminfo, strict=False, multi=False)

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)

getTagID :: String -> Info -> IO (Maybe Int) Source #

getTagID(info, strict=False, create=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)

getTaskInfo Source #

Arguments

:: 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)

getVolume :: String -> Info -> IO Value Source #

getVolume(volume, strict=False)

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)

listCGs :: String -> IO Struct Source #

listCGs()

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)

listPackagesSimple Source #

Arguments

:: 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 Source #

Arguments

:: String 
-> Struct

opts

-> Struct

qopts

-> IO [Struct] 

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()

repoInfo :: String -> Int -> IO Value Source #

repoInfo(repo_id, strict=False)

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)

data Value #

Constructors

ValueInt Int 
ValueBool Bool 
ValueString String 
ValueUnwrapped String 
ValueDouble Double 
ValueDateTime LocalTime 
ValueBase64 ByteString 
ValueStruct [(String, Value)] 
ValueArray [Value] 
ValueNil 

Instances

Instances details
Eq Value 
Instance details

Defined in Network.XmlRpc.Internals

Methods

(==) :: Value -> Value -> Bool

(/=) :: Value -> Value -> Bool

Show Value 
Instance details

Defined in Network.XmlRpc.Internals

Methods

showsPrec :: Int -> Value -> ShowS

show :: Value -> String

showList :: [Value] -> ShowS

XmlRpcType Value 
Instance details

Defined in Network.XmlRpc.Internals

Methods

toValue :: Value -> Value

fromValue :: forall (m :: Type -> Type). MonadFail m => Value -> Err m Value

getType :: Value -> Type

type Struct = [(String, Value)] Source #

lookupStruct :: XmlRpcType a => String -> Struct -> Maybe a Source #

Lookup a key in a XML result

getValue :: XmlRpcType a => Value -> Maybe a Source #