| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Hercules.CLI.Credentials
Description
Manages the ~.confighercules-ci/credentials.json
Synopsis
- data Credentials = Credentials {}
- data DomainCredentials = DomainCredentials {}
- data CredentialsParsingException = CredentialsParsingException {}
- data NoCredentialException = NoCredentialException {}
- data ApiBaseUrlParsingException = ApiBaseUrlParsingException {}
- getCredentialsFilePath :: IO FilePath
- readCredentials :: IO Credentials
- parseCredentials :: FilePath -> ByteString -> Either CredentialsParsingException Credentials
- writeCredentials :: Credentials -> IO ()
- urlDomain :: Text -> Either Text Text
- determineDomain :: IO Text
- writePersonalToken :: Text -> Text -> IO ()
- readPersonalToken :: Text -> IO Text
- tryReadEffectToken :: IO (Maybe Text)
- tryReadEffectTokenFromEnv :: MaybeT IO Text
- tryReadEffectTokenFromFile :: MaybeT IO Text
- readToken :: IO Text -> IO Text
Documentation
data Credentials Source #
Constructors
| Credentials | |
Fields | |
Instances
| FromJSON Credentials Source # | |
Defined in Hercules.CLI.Credentials | |
| ToJSON Credentials Source # | |
Defined in Hercules.CLI.Credentials Methods toJSON :: Credentials -> Value # toEncoding :: Credentials -> Encoding # toJSONList :: [Credentials] -> Value # toEncodingList :: [Credentials] -> Encoding # | |
| Generic Credentials Source # | |
Defined in Hercules.CLI.Credentials Associated Types type Rep Credentials :: Type -> Type # | |
| Eq Credentials Source # | |
Defined in Hercules.CLI.Credentials | |
| type Rep Credentials Source # | |
Defined in Hercules.CLI.Credentials type Rep Credentials = D1 ('MetaData "Credentials" "Hercules.CLI.Credentials" "hercules-ci-cli-0.3.4-inplace" 'False) (C1 ('MetaCons "Credentials" 'PrefixI 'True) (S1 ('MetaSel ('Just "domains") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text DomainCredentials)))) | |
data DomainCredentials Source #
Constructors
| DomainCredentials | |
Fields | |
Instances
data CredentialsParsingException Source #
Constructors
| CredentialsParsingException | |
Instances
| Exception CredentialsParsingException Source # | |
Defined in Hercules.CLI.Credentials | |
| Show CredentialsParsingException Source # | |
Defined in Hercules.CLI.Credentials Methods showsPrec :: Int -> CredentialsParsingException -> ShowS # show :: CredentialsParsingException -> String # showList :: [CredentialsParsingException] -> ShowS # | |
| Eq CredentialsParsingException Source # | |
Defined in Hercules.CLI.Credentials Methods (==) :: CredentialsParsingException -> CredentialsParsingException -> Bool # (/=) :: CredentialsParsingException -> CredentialsParsingException -> Bool # | |
data NoCredentialException Source #
Constructors
| NoCredentialException | |
Fields | |
Instances
| Exception NoCredentialException Source # | |
Defined in Hercules.CLI.Credentials | |
| Show NoCredentialException Source # | |
Defined in Hercules.CLI.Credentials Methods showsPrec :: Int -> NoCredentialException -> ShowS # show :: NoCredentialException -> String # showList :: [NoCredentialException] -> ShowS # | |
| Eq NoCredentialException Source # | |
Defined in Hercules.CLI.Credentials Methods (==) :: NoCredentialException -> NoCredentialException -> Bool # (/=) :: NoCredentialException -> NoCredentialException -> Bool # | |
data ApiBaseUrlParsingException Source #
Constructors
| ApiBaseUrlParsingException | |
Fields | |
Instances
| Exception ApiBaseUrlParsingException Source # | |
Defined in Hercules.CLI.Credentials | |
| Show ApiBaseUrlParsingException Source # | |
Defined in Hercules.CLI.Credentials Methods showsPrec :: Int -> ApiBaseUrlParsingException -> ShowS # show :: ApiBaseUrlParsingException -> String # showList :: [ApiBaseUrlParsingException] -> ShowS # | |
| Eq ApiBaseUrlParsingException Source # | |
Defined in Hercules.CLI.Credentials Methods (==) :: ApiBaseUrlParsingException -> ApiBaseUrlParsingException -> Bool # (/=) :: ApiBaseUrlParsingException -> ApiBaseUrlParsingException -> Bool # | |
parseCredentials :: FilePath -> ByteString -> Either CredentialsParsingException Credentials Source #
writeCredentials :: Credentials -> IO () Source #
determineDomain :: IO Text Source #