Documentation ¶
Overview ¶
Package aur lets you query the Arch Linux User Repository (AUR).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
IsNotFound returns true if the error is an instance of NotFoundError.
Types ¶
type NotFoundError ¶
type NotFoundError struct {
Names []string
}
NotFoundError is returned when a package could not be found on AUR.
The error message returned is different dependent on the number of packages that could not be found.
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type Package ¶
type Package struct { ID uint64 Name string PackageBaseID uint64 PackageBase string Version string Description string URL string NumVotes int Popularity float64 OutOfDate int Maintainer string FirstSubmitted uint64 LastModified uint64 URLPath string Groups []string Depends []string MakeDepends []string OptDepends []string Conflicts []string Provides []string Replaces []string License []string Keywords []string }
Package is the information that we can retrieve about a package that is hosted on the Arch Linux User Repository (AUR), version 4.
JSON Example:
{ "ID": 213309, "Name": "repoctl", "PackageBaseID": 96153, "PackageBase": "repoctl", "Version": "0.13-2", "Description": "A supplement to repo-add and repo-remove which simplifies managing local repositories", "URL": "https:\/\/github.com\/cassava\/repoctl", "NumVotes": 1, "OutOfDate": 0, "Maintainer": "cassava", "FirstSubmitted": 1437296687, "LastModified": 1437298275, "License": "MIT", "URLPath": "\/cgit\/aur.git\/snapshot\/repoctl.tar.gz", "CategoryID": 1, "Popularity": 0 }
func Read ¶
Read reads package information from the Arch Linux User Repository (AUR) online.
If a package cannot be found, (nil, *NotFoundError) is returned.
func (*Package) DownloadURL ¶
DownloadURL returns the URL for downloading the PKGBUILD tarball.
func (*Package) Pkg ¶
Pkg converts an aur.Package into a pacman.Package.
Note that only a few fields in the resulting Package are actually filled in, namely Origin, Name, Version, Description, URL, and License. This is all the information that we are able to retrieve.
func (*Package) PkgDepends ¶
PkgDepends returns the dependencies of the package.
func (*Package) PkgMakeDepends ¶
PkgMakeDepends returns the make dependenciess of the package.
func (*Package) PkgVersion ¶
PkgVersion returns the version string of the package.
type Packages ¶
type Packages []*Package
Packages is a slice of Package with several methods facilitating sorting, iterating, and converting to pacman.Packages.
func ReadAll ¶
ReadAll reads multiple packages from the Arch Linux User Repository (AUR) at once.
If any packages cannot be found, (Packages, *NotFoundError) is returned. That is, all successfully read packages are returned.
func SearchByName ¶
func (Packages) Iterate ¶
func (pkgs Packages) Iterate(f func(pacman.AnyPackage))
Iterate calls f for each package in the list of packages.