Copyright | (c) 2021 berberman |
---|---|
License | MIT |
Maintainer | berberman <[email protected]> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Web.ArchLinux.Types
Contents
Description
This module defines types and their serializations used in API.
Fields' names are prefixed with _
for lenses generation,
consider using Web.ArchLinux.Types.Lens to access data types smoothly.
Synopsis
- data Repo
- data Arch
- data License
- = AGPL_3_0_only
- | AGPL_3_0_or_later
- | Apache_2_0
- | Artistic_1_0_Perl
- | Artistic_2_0
- | BSL_1_0
- | CC_BY_1_0
- | CC_BY_2_0
- | CC_BY_2_5
- | CC_BY_3_0_AT
- | CC_BY_3_0_US
- | CC_BY_3_0
- | CC_BY_4_0
- | CC_BY_NC_1_0
- | CC_BY_NC_2_0
- | CC_BY_NC_2_5
- | CC_BY_NC_3_0
- | CC_BY_NC_4_0
- | CC_BY_NC_ND_1_0
- | CC_BY_NC_ND_2_0
- | CC_BY_NC_ND_2_5
- | CC_BY_NC_ND_3_0_IGO
- | CC_BY_NC_ND_3_0
- | CC_BY_NC_ND_4_0
- | CC_BY_NC_SA_1_0
- | CC_BY_NC_SA_2_0
- | CC_BY_NC_SA_2_5
- | CC_BY_NC_SA_3_0
- | CC_BY_NC_SA_4_0
- | CC_BY_ND_1_0
- | CC_BY_ND_2_0
- | CC_BY_ND_2_5
- | CC_BY_ND_3_0
- | CC_BY_ND_4_0
- | CC_BY_SA_1_0
- | CC_BY_SA_2_0_UK
- | CC_BY_SA_2_1_JP
- | CC_BY_SA_2_5
- | CC_BY_SA_3_0_AT
- | CC_BY_SA_3_0
- | CC_BY_SA_4_0
- | CC_PDDC
- | CC0_1_0
- | CDDL_1_0
- | CDDL_1_1
- | CPL_1_0
- | EPL_1_0
- | EPL_2_0
- | FSFAP
- | GFDL_1_1_invariants_only
- | GFDL_1_1_invariants_or_later
- | GFDL_1_1_no_invariants_only
- | GFDL_1_1_no_invariants_or_later
- | GFDL_1_1_only
- | GFDL_1_1_or_later
- | GFDL_1_2_invariants_only
- | GFDL_1_2_invariants_or_later
- | GFDL_1_2_no_invariants_only
- | GFDL_1_2_no_invariants_or_later
- | GFDL_1_2_only
- | GFDL_1_2_or_later
- | GFDL_1_3_invariants_only
- | GFDL_1_3_invariants_or_later
- | GFDL_1_3_no_invariants_only
- | GFDL_1_3_no_invariants_or_later
- | GFDL_1_3_only
- | GFDL_1_3_or_later
- | GPL_1_0_only
- | GPL_1_0_or_later
- | GPL_2_0_only
- | GPL_2_0_or_later
- | GPL_3_0_only
- | GPL_3_0_or_later
- | LGPL_2_0_only
- | LGPL_2_0_or_later
- | LGPL_2_1_only
- | LGPL_2_1_or_later
- | LGPL_3_0_only
- | LGPL_3_0_or_later
- | LGPLLR
- | LPPL_1_0
- | LPPL_1_1
- | LPPL_1_2
- | LPPL_1_3a
- | LPPL_1_3c
- | MPL_1_0
- | MPL_1_1
- | MPL_2_0
- | PHP_3_0
- | PHP_3_01
- | PSF_2_0
- | Ruby
- | Unlicense
- | W3C
- | WTFPL
- | ZPL_1_1
- | ZPL_2_0
- | ZPL_2_1
- | Custom Text
- licenseId :: License -> Text
- parseLicense :: Text -> License
- data PackageInformation = PackageInformation {
- _pkgname :: Text
- _pkgbase :: Text
- _repo :: Repo
- _arch :: Arch
- _pkgver :: Text
- _pkgrel :: Text
- _epoch :: Int
- _pkgdesc :: Text
- _url :: Text
- _filename :: Text
- _compressedSize :: Int
- _installedSize :: Int
- _buildDate :: UTCTime
- _lastUpdate :: UTCTime
- _flageDate :: Maybe UTCTime
- _maintainers :: [Text]
- _packager :: Text
- _groups :: [Text]
- _licenses :: [License]
- _conflicts :: [Text]
- _provides :: [Text]
- _replaces :: [Text]
- _depends :: [Text]
- _optdepends :: [Text]
- _makedepends :: [Text]
- _checkdepends :: [Text]
- data PackageFiles = PackageFiles {}
- data Flagged
- data ArchLinuxResponse a = ArchLinuxResponse {}
- data AurSearch = AurSearch {
- _id :: Int
- _name :: Text
- _packageBaseID :: Int
- _packageBase :: Text
- _version :: Text
- _description :: Maybe Text
- _url :: Maybe Text
- _numVotes :: Int
- _popularity :: Double
- _outOfDate :: Maybe Int
- _maintainer :: Maybe Text
- _firstSubmitted :: Int
- _lastModified :: Int
- _urlPath :: Text
- data AurInfo = AurInfo {}
- data AurResponseType
- data AurResponse a = AurResponse {
- _version :: Int
- _aurType :: AurResponseType
- _resultCount :: Int
- _results :: a
- _error :: Maybe Text
Arch Linux official
Official repositories.
Instances
Official architectures.
Instances
FromJSON Arch Source # | |
Defined in Web.ArchLinux.Types | |
ToJSON Arch Source # | |
Enum Arch Source # | |
Generic Arch Source # | |
Show Arch Source # | |
Eq Arch Source # | |
Ord Arch Source # | |
ToHttpApiData Arch Source # | |
Defined in Web.ArchLinux.Types Methods toUrlPiece :: Arch -> Text # toEncodedUrlPiece :: Arch -> Builder # toHeader :: Arch -> ByteString # toQueryParam :: Arch -> Text # toEncodedQueryParam :: Arch -> Builder # | |
HasArch PackageFiles Arch Source # | |
Defined in Web.ArchLinux.Types.Lens | |
HasArch PackageInformation Arch Source # | |
Defined in Web.ArchLinux.Types.Lens | |
type Rep Arch Source # | |
Defined in Web.ArchLinux.Types |
SPDX License Identifiers included in https://archlinux.org/packages/core/any/licenses/,
Constructors
Instances
FromJSON License Source # | |
Defined in Web.ArchLinux.Types | |
ToJSON License Source # | |
Generic License Source # | |
Show License Source # | |
Eq License Source # | |
Ord License Source # | |
HasLicenses AurInfo [License] Source # | |
HasLicenses PackageInformation [License] Source # | |
Defined in Web.ArchLinux.Types.Lens | |
type Rep License Source # | |
Defined in Web.ArchLinux.Types type Rep License = D1 ('MetaData "License" "Web.ArchLinux.Types" "arch-web-0.3.1-G4JUEPhM0pIA1DtG7KVkWx" 'False) ((((((C1 ('MetaCons "AGPL_3_0_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AGPL_3_0_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Apache_2_0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Artistic_1_0_Perl" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Artistic_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BSL_1_0" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CC_BY_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_2_5" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "CC_BY_3_0_AT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_3_0_US" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_3_0" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "CC_BY_4_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_NC_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_NC_2_0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "CC_BY_NC_2_5" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_NC_3_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_NC_4_0" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CC_BY_NC_ND_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_NC_ND_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_NC_ND_2_5" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "CC_BY_NC_ND_3_0_IGO" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_NC_ND_3_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_NC_ND_4_0" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "CC_BY_NC_SA_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_NC_SA_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_NC_SA_2_5" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "CC_BY_NC_SA_3_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_NC_SA_4_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_ND_1_0" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CC_BY_ND_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_ND_2_5" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_ND_3_0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "CC_BY_ND_4_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_SA_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_SA_2_0_UK" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "CC_BY_SA_2_1_JP" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_SA_2_5" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_BY_SA_3_0_AT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "CC_BY_SA_3_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CC_BY_SA_4_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CC_PDDC" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "CC0_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CDDL_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CDDL_1_1" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "CPL_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EPL_1_0" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EPL_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FSFAP" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "GFDL_1_1_invariants_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GFDL_1_1_invariants_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GFDL_1_1_no_invariants_only" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "GFDL_1_1_no_invariants_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GFDL_1_1_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GFDL_1_1_or_later" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "GFDL_1_2_invariants_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GFDL_1_2_invariants_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GFDL_1_2_no_invariants_only" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "GFDL_1_2_no_invariants_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GFDL_1_2_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GFDL_1_2_or_later" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "GFDL_1_3_invariants_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GFDL_1_3_invariants_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GFDL_1_3_no_invariants_only" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "GFDL_1_3_no_invariants_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GFDL_1_3_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GFDL_1_3_or_later" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "GPL_1_0_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GPL_1_0_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GPL_2_0_only" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GPL_2_0_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GPL_3_0_only" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GPL_3_0_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LGPL_2_0_only" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "LGPL_2_0_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LGPL_2_1_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LGPL_2_1_or_later" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "LGPL_3_0_only" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LGPL_3_0_or_later" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LGPLLR" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "LPPL_1_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LPPL_1_1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LPPL_1_2" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "LPPL_1_3a" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LPPL_1_3c" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MPL_1_0" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "MPL_1_1" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MPL_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PHP_3_0" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "PHP_3_01" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PSF_2_0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Ruby" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "Unlicense" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "W3C" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "WTFPL" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ZPL_1_1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ZPL_2_0" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ZPL_2_1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Custom" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))))))) |
parseLicense :: Text -> License Source #
data PackageInformation Source #
Package details returned by getPackageDetails
.
Constructors
PackageInformation | |
Fields
|
Instances
data PackageFiles Source #
Package files list returned by getPackageFiles
Constructors
PackageFiles | |
Instances
Flagged package means out-of-date.
Constructors
Flagged | |
NotFlagged |
Instances
Enum Flagged Source # | |
Generic Flagged Source # | |
Show Flagged Source # | |
Eq Flagged Source # | |
Ord Flagged Source # | |
ToHttpApiData Flagged Source # | |
Defined in Web.ArchLinux.Types Methods toUrlPiece :: Flagged -> Text # toEncodedUrlPiece :: Flagged -> Builder # toHeader :: Flagged -> ByteString # toQueryParam :: Flagged -> Text # toEncodedQueryParam :: Flagged -> Builder # | |
type Rep Flagged Source # | |
data ArchLinuxResponse a Source #
Response data type of searchPackage
.
Instances
AUR
Search results returned by searchAur
.
Some of fields are renamed in this record type, for sharing overloaded lenses between data type returned by Arch Linux official API.
Constructors
AurSearch | |
Fields
|
Instances
Package details returned by getAurInfo
.
This data type extends AurSearch
informally,
so it includes $sel:_search:AurInfo
as a member.
Constructors
AurInfo | |
Instances
data AurResponseType Source #
Return types of AUR API.
Instances
data AurResponse a Source #
Response data type of AUR API.
Constructors
AurResponse | |