repos

package module
v0.0.0-...-e4a18ae Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: MIT Imports: 18 Imported by: 0

README

Repos go API (rpm only atm.)

Can download metadata from Metalink/Baseurl repos. and parse basic package data.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByPkg

type ByPkg []*Pkg

func (ByPkg) Len

func (a ByPkg) Len() int

func (ByPkg) Less

func (a ByPkg) Less(i, j int) bool

func (ByPkg) Swap

func (a ByPkg) Swap(i, j int)

type Checksum

type Checksum struct {
	Kind string
	Data string
}

func (Checksum) String

func (chk Checksum) String() string

type Data

type Data struct {
	Path string
	Chks []Checksum
	Size int
	TM   time.Time
}

type Pkg

type Pkg struct {
	// contains filtered or unexported fields
}

func (*Pkg) Checksum

func (pkg *Pkg) Checksum() Checksum

func (*Pkg) Cmp

func (pkg *Pkg) Cmp(o *Pkg) int

Less: Comparison, for sorting

func (*Pkg) Envra

func (pkg *Pkg) Envra() string

func (*Pkg) Match

func (pkg *Pkg) Match(pattern string) bool

Match: User input to all forms of a package

func (*Pkg) Na

func (pkg *Pkg) Na() string

func (*Pkg) Name

func (pkg *Pkg) Name() string

func (*Pkg) Nevr

func (pkg *Pkg) Nevr() string

func (*Pkg) Nevra

func (pkg *Pkg) Nevra() string

func (*Pkg) Nvr

func (pkg *Pkg) Nvr() string

func (*Pkg) Nvra

func (pkg *Pkg) Nvra() string

func (*Pkg) String

func (pkg *Pkg) String() string

String: String representation of a pkg

func (*Pkg) UIenvra

func (pkg *Pkg) UIenvra() string

func (*Pkg) UInevr

func (pkg *Pkg) UInevr() string

func (*Pkg) UInevra

func (pkg *Pkg) UInevra() string

type Pkgs

type Pkgs struct {
	Repo *Repodata
	Pkgs []*Pkg
}

func (*Pkgs) Match

func (pkgs *Pkgs) Match(pattern string) *Pkgs

func (*Pkgs) Merge

func (a *Pkgs) Merge(b *Pkgs) *Pkgs

func (*Pkgs) RPMDBVersion

func (pkgs *Pkgs) RPMDBVersion() *RPMDBV

type RPMDBV

type RPMDBV struct {
	// contains filtered or unexported fields
}

func (*RPMDBV) Checksum

func (r *RPMDBV) Checksum() Checksum

func (*RPMDBV) Count

func (r *RPMDBV) Count() int

func (*RPMDBV) String

func (r *RPMDBV) String() string

type Repodata

type Repodata struct {
	Baseurl  string
	Revision int
	Primary  Data
	Files    Data
	GrpRAW   Data
	GrpGZ    Data
	Other    Data
	ModMD    Data
}

func (*Repodata) Load

func (repo *Repodata) Load() (*Pkgs, error)

func (*Repodata) MustLoad

func (snap *Repodata) MustLoad() *Pkgs

type Snapshot

type Snapshot struct {
	URLs   []URL
	Repomd Data
}

func Baseurl

func Baseurl(url string) (*Snapshot, error)
func Metalink(url string) (*Snapshot, error)

func (*Snapshot) RepoMD

func (snap *Snapshot) RepoMD() (*Repodata, error)

type URL

type URL struct {
	URL string
	Pri int
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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