-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A more secure version of cabal upload which uses HTTPS
--
@package stackage-upload
@version 0.1.0.0
-- | Provide ability to upload tarballs to Hackage.
module Stackage.Upload
-- | Turn the given settings into an Uploader.
--
-- Since 0.1.0.0
mkUploader :: UploadSettings -> IO Uploader
-- | The computed value from a UploadSettings.
--
-- Typically, you want to use this with upload.
--
-- Since 0.1.0.0
data Uploader
-- | Upload a single tarball with the given Uploader.
--
-- Since 0.1.0.0
upload :: Uploader -> FilePath -> IO ()
-- | Settings for creating an Uploader.
--
-- Since 0.1.0.0
data UploadSettings
-- | Default value for UploadSettings.
--
-- Use setter functions to change defaults.
--
-- Since 0.1.0.0
defaultUploadSettings :: UploadSettings
-- | Change the upload URL.
--
-- Default: "https://hackage.haskell.org/packages/"
--
-- Since 0.1.0.0
setUploadUrl :: String -> UploadSettings -> UploadSettings
-- | How to get an HTTP connection manager.
--
-- Default: newManager tlsManagerSettings
--
-- Since 0.1.0.0
setGetManager :: IO Manager -> UploadSettings -> UploadSettings
-- | How to get the Hackage credentials.
--
-- Default: fromAnywhere
--
-- Since 0.1.0.0
setCredsSource :: HackageCredsSource -> UploadSettings -> UploadSettings
-- | Save new credentials to the config file.
--
-- Default: True
--
-- Since 0.1.0.0
setSaveCreds :: Bool -> UploadSettings -> UploadSettings
-- | Username and password to log into Hackage.
--
-- Since 0.1.0.0
data HackageCreds
-- | Load Hackage credentials from the given source.
--
-- Since 0.1.0.0
loadCreds :: HackageCredsSource -> IO (HackageCreds, FromFile)
-- | Save the given credentials to the credentials file.
--
-- Since 0.1.0.0
saveCreds :: HackageCreds -> IO ()
-- | Whether the Hackage credentials were loaded from a file.
--
-- This information is useful since, typically, you only want to save the
-- credentials to a file if it wasn't already loaded from there.
--
-- Since 0.1.0.0
type FromFile = Bool
-- | A source for getting Hackage credentials.
--
-- Since 0.1.0.0
data HackageCredsSource
-- | Try to load the credentials from the config file. If that fails, ask
-- the user to enter them.
--
-- Since 0.1.0.0
fromAnywhere :: HackageCredsSource
-- | Load the Hackage credentials from the prompt, asking the user to type
-- them in.
--
-- Since 0.1.0.0
fromPrompt :: HackageCredsSource
-- | Load the Hackage credentials from the JSON config file.
--
-- Since 0.1.0.0
fromFile :: HackageCredsSource
-- | Load the Hackage credentials from the given arguments.
--
-- Since 0.1.0.0
fromMemory :: Text -> Text -> HackageCredsSource
instance Typeable HackageCredsExceptions
instance Show HackageCreds
instance Show HackageCredsExceptions
instance Exception HackageCredsExceptions
instance FromJSON HackageCreds
instance ToJSON HackageCreds