rpm

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SearchPackages added in v0.3.0

func SearchPackages(so *SearchOptions) ([]packages.Package, error)

SearchPackages crawls packages from the specified repositories, and returns a list of package of type Package with specified name. func SearchPackages(repositoryURLs []*url.URL, packageName string, packageFileNames ...string) ([]Package, error) {

Types

type Data

type Data struct {
	Type     string   `xml:"type,attr"`
	Location Location `xml:"location"`
}

func (*Data) GetLocation

func (d *Data) GetLocation() string

type Entry

type Entry struct {
	XMLName xml.Name `xml:"entry"`
	Name    string   `xml:"name,attr"`
}

type Location

type Location struct {
	Href string `xml:"href,attr"`
}

type Package

type Package struct {
	XMLName     xml.Name        `xml:"package"`
	Name        string          `xml:"name"`
	Arch        string          `xml:"arch"`
	Version     PackageVersion  `xml:"version"`
	Summary     string          `xml:"summary"`
	Description string          `xml:"description"`
	Packager    string          `xml:"packager"`
	Time        PackageTime     `xml:"time"`
	Size        PackageSize     `xml:"size"`
	Location    PackageLocation `xml:"location"`
	Format      PackageFormat   `xml:"format"`
	// contains filtered or unexported fields
}

func (*Package) FileReaders

func (p *Package) FileReaders() []io.Reader

func (*Package) GetArch

func (p *Package) GetArch() string

func (*Package) GetLocation

func (p *Package) GetLocation() string

func (*Package) GetName

func (p *Package) GetName() string

func (*Package) GetRelease

func (p *Package) GetRelease() string

func (*Package) GetVersion

func (p *Package) GetVersion() string

func (*Package) URL

func (p *Package) URL() string

type PackageFormat

type PackageFormat struct {
	XMLName     xml.Name           `xml:"format"`
	License     string             `xml:"license"`
	Vendor      string             `xml:"vendor"`
	Group       string             `xml:"group"`
	Buildhost   string             `xml:"buildhost"`
	HeaderRange PackageHeaderRange `xml:"header-range"`
	Requires    PackageRequires    `xml:"requires"`
	Provides    PackageProvides    `xml:"provides"`
}

type PackageHeaderRange

type PackageHeaderRange struct {
	Start string `xml:"start,attr"`
	End   string `xml:"end,attr"`
}

type PackageLocation

type PackageLocation struct {
	XMLName xml.Name `xml:"location"`
	Href    string   `xml:"href,attr"`
}

type PackageProvides

type PackageProvides struct {
	XMLName xml.Name `xml:"provides"`
	Entries []Entry  `xml:"entry"`
}

type PackageRequires

type PackageRequires struct {
	XMLName xml.Name `xml:"requires"`
	Entries []Entry  `xml:"entry"`
}

type PackageSize

type PackageSize struct {
	Package   string `xml:"package,attr"`
	Installed string `xml:"installed,attr"`
	Archive   string `xml:"archive,attr"`
}

type PackageTime

type PackageTime struct {
	File  string `xml:"file,attr"`
	Build string `xml:"build,attr"`
}

type PackageVersion

type PackageVersion struct {
	XMLName xml.Name `xml:"version"`
	Epoch   string   `xml:"epoch,attr"`
	Ver     string   `xml:"ver,attr"`
	Rel     string   `xml:"rel,attr"`
}

type PrimaryRepositoryMetadata

type PrimaryRepositoryMetadata struct {
	XMLName  xml.Name  `xml:"metadata"`
	Packages []Package `xml:"package"`
}

type RepositoryMetadata

type RepositoryMetadata struct {
	XMLName  xml.Name `xml:"repomd"`
	Revision string   `xml:"revision"`
	Data     []Data   `xml:"data"`
}

type SearchOptions added in v0.3.0

type SearchOptions struct {
	*packages.SearchOptions
}

func NewSearchOptions added in v0.3.0

func NewSearchOptions(options *packages.SearchOptions, architectures []packages.Architecture, seedURLs []string) *SearchOptions

NewSearchOptions returns a pointer to a SearchOptions object from a pointer to a packages.SearchOptions, and overriding architectures and seedURLs.

Jump to

Keyboard shortcuts

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