aur

package module
v0.0.0-...-1cb4e29 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: GPL-3.0 Imports: 4 Imported by: 25

README

GoDoc

go wrapper for the AUR JSON API

Wrapper around the json API v5 for AUR found at http://aur.archlinux.org/rpc.php

LICENSE

Copyright (C) 2016 Mikkel Oscar Lyderik Larsen

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AURURL = "https://aur.archlinux.org/rpc.php?"

AURURL is the base string from which the query is built

View Source
var (
	// ErrServiceUnavailable represents a error when AUR is unavailable
	ErrServiceUnavailable = errors.New("AUR is unavailable at this moment")
)

Functions

This section is empty.

Types

type By

type By int

By specifies what to seach by in RPC searches

const (
	Name By = iota + 1
	NameDesc
	Maintainer
	Depends
	MakeDepends
	OptDepends
	CheckDepends
)

func (By) String

func (by By) String() string

type Pkg

type Pkg struct {
	ID             int      `json:"ID"`
	Name           string   `json:"Name"`
	PackageBaseID  int      `json:"PackageBaseID"`
	PackageBase    string   `json:"PackageBase"`
	Version        string   `json:"Version"`
	Description    string   `json:"Description"`
	URL            string   `json:"URL"`
	NumVotes       int      `json:"NumVotes"`
	Popularity     float64  `json:"Popularity"`
	OutOfDate      int      `json:"OutOfDate"`
	Maintainer     string   `json:"Maintainer"`
	FirstSubmitted int      `json:"FirstSubmitted"`
	LastModified   int      `json:"LastModified"`
	URLPath        string   `json:"URLPath"`
	Depends        []string `json:"Depends"`
	MakeDepends    []string `json:"MakeDepends"`
	CheckDepends   []string `json:"CheckDepends"`
	Conflicts      []string `json:"Conflicts"`
	Provides       []string `json:"Provides"`
	Replaces       []string `json:"Replaces"`
	OptDepends     []string `json:"OptDepends"`
	Groups         []string `json:"Groups"`
	License        []string `json:"License"`
	Keywords       []string `json:"Keywords"`
}

Pkg holds package information

func Info

func Info(pkgs []string) ([]Pkg, error)

Info shows info for one or multiple packages.

func Orphans

func Orphans() ([]Pkg, error)
func Search(query string) ([]Pkg, error)

Search searches for packages using the RPC's default search by. This is the same as using SearchBy With NameDesc

func SearchBy

func SearchBy(query string, by By) ([]Pkg, error)

SearchBy searches for packages with a specified search by

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL