-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Library for Fedora release versions
--   
--   This library provides the Branch and Release data types and various
--   associated metadata functions for Fedora releases (Fedora and EPEL)
--   needed for packaging development and building. It caches current
--   release data from Fedora Bodhi.
@package fedora-releases
@version 0.3.0


-- | Low level library with aeson Object's for releases fetched from Bodhi
--   API.
module Distribution.Fedora.BodhiReleases

-- | Get Releases from Fedora Bodhi API (excluding archived)
getBodhiReleases :: IO [Object]

-- | Get Releases from Bodhi API filtered by id_prefix
getBodhiProductReleases :: String -> IO [Object]

-- | Get FEDORA Releases from Bodhi API
getBodhiFedoraReleases :: IO [Object]

-- | Get FEDORA-EPEL Releases from Bodhi API
getBodhiEPELReleases :: IO [Object]

-- | Get releases for branch name
getBodhiBranchReleases :: String -> IO [Object]
lookupKey :: FromJSON a => Text -> Object -> Maybe a


-- | The module provides a higher level API over BodhiReleases with a
--   Release record type.
module Distribution.Fedora.Release

-- | Fedora Release data
--   
--   See <a>https://bodhi.fedoraproject.org/releases/</a>
data Release
Release :: String -> String -> String -> String -> Bool -> String -> String -> Maybe String -> String -> Bool -> Maybe String -> String -> Maybe String -> Release
[releaseName] :: Release -> String
[releaseVersion] :: Release -> String
[releaseIdPrefix] :: Release -> String
[releaseBranch] :: Release -> String
[releaseComposed] :: Release -> Bool
[releaseCandidateTag] :: Release -> String
[releaseDistTag] :: Release -> String
[releaseSettingStatus] :: Release -> Maybe String
[releaseState] :: Release -> String
[releaseAutomaticUpdates] :: Release -> Bool
[releaseTestingRepo] :: Release -> Maybe String
[releaseTestingTag] :: Release -> String
[releaseEOL] :: Release -> Maybe String

-- | Get list of all current Fedora Project releases (from Bodhi)
getActiveReleases :: IO [Release]

-- | Get list of current Fedora Linux releases
getFedoraReleases :: IO [Release]

-- | Get list of current Fedora EPEL releases
getEPELReleases :: IO [Release]

-- | Get the Release for an active Branch
--   
--   Errors for an inactive Branch
getBranchRelease :: String -> IO Release

-- | Get the Fedora release version of Rawhide
getRawhideVersion :: IO Natural

-- | Get the latest current stable Fedora release version
getCurrentFedoraVersion :: IO Natural
instance GHC.Classes.Eq Distribution.Fedora.Release.Release
instance GHC.Show.Show Distribution.Fedora.Release.Release
instance GHC.Classes.Ord Distribution.Fedora.Release.Release


-- | The module provides a Branch type for Fedora and EPEL for active
--   Release's.
module Distribution.Fedora.Branch

-- | Branch datatype
--   
--   Branch can be rawhide, or a fedora or epel branch
data Branch
EPELMinor :: !Natural -> !Natural -> Branch
EPEL :: !Natural -> Branch
EPELNext :: !Natural -> Branch
Fedora :: !Natural -> Branch
Rawhide :: Branch

-- | Read a Fedora Branch name
readBranch :: String -> Maybe Branch

-- | render Branch to String
showBranch :: Branch -> String

-- | Read a Fedora Branch name, otherwise return branch string
eitherBranch :: String -> Either String Branch

-- | Read a Branch name (one of the list of active branches)
--   
--   Similar to eitherActiveBranch but ignores any error string
readActiveBranch :: [Branch] -> String -> Maybe Branch

-- | Read a Branch name (one of the list of active branches)
--   
--   Provides error strings for inactive or unknown branches.
eitherActiveBranch :: [Branch] -> String -> Either String Branch

-- | Returns newer branch than given one from supplied active branches.
--   
--   Branches should be in descending order, eg from getFedoraBranches
newerBranch :: Branch -> [Branch] -> Maybe Branch

-- | Returns descending list of active Fedora branches, including rawhide
--   and EPEL
getActiveBranches :: IO [Branch]

-- | Returns list of active Fedora branches, excluding rawhide
getActiveBranched :: IO [Branch]

-- | get newest Fedora branched Release
getLatestFedoraBranch :: IO Branch

-- | Map Branch to Koji destination tag (candidate tag)
branchDestTag :: Branch -> IO String

-- | Converts koji dist tag to rpm %dist tag for branch
--   
--   f41 -&gt; .fc41
--   
--   epel10.0 -&gt; .el10_0
branchDistTag :: Branch -> IO String

-- | Get Release associated with release Branch
--   
--   Fails if given an inactive branch
branchRelease :: Branch -> IO Release

-- | separate fedora branches from rest of args
partitionBranches :: [String] -> ([Branch], [String])
instance GHC.Classes.Eq Distribution.Fedora.Branch.Branch
instance GHC.Classes.Ord Distribution.Fedora.Branch.Branch
