aur

package
v0.0.0-...-339c7a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package aur provides functions and types for interacting with Arch Linux's AUR.

Index

Constants

View Source
const AURHost = "https://aur.archlinux.org"

AURHost is the HTTP scheme and domain of the AUR.

Variables

This section is empty.

Functions

func DownloadSnapshot

func DownloadSnapshot(name string) (filepath string, err error)

DownloadSnapshot retrieves a snapshot of the package with name and saves it locally. The output file is saved in a subdirectory created in the OS's temporary directory. If the HTTP and file operations are successful the file's absolute path is returned in filepath. Any error encountered is returned in err.

func Info

func Info(packages []string) (results []aurPackage, err error)

Info queries the AUR for detailed information about the requested packages. The results will include details about licenses, package relationships, etc. If the request generates a Go error, or the API returns an error, it is available in err.

func Search(keyword string, by SearchType) (results []aurPackage, err error)

Search queries the AUR for any packages matching the keyword. Searches can be performed against any package detail described as a SearchType in this package. The results, if any, do not include details about dependencies, licensing, etc. Any Go-generated or AUR error is returned in err.

Types

type SearchType

type SearchType int

A SearchType is the kind of AUR search to perform. It determines which fields of packages a search term will match against.

const (
	NameDesc     SearchType = iota // match name or description
	Name                           // match package names only
	Maintainer                     // match package maintainers
	Depends                        // match package dependencies
	MakeDepends                    // match dependencies required to build a package
	OptDepends                     // match optional dependencies of a package
	CheckDepends                   // match dependencies required to check a package
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳