alas

package
v1.5.27 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRepoNotFound = errors.New("Repo not found")

Functions

This section is empty.

Types

type Checksum

type Checksum struct {
	Sum  string `xml:",chardata"`
	Type string `xml:"type,attr"`
}

type Date

type Date time.Time

func (*Date) UnmarshalXMLAttr

func (d *Date) UnmarshalXMLAttr(attr xml.Attr) (err error)

UnmarshalXMLAttr implements xml.UnmarshalerAttr.

type DateElem

type DateElem struct {
	Date `xml:"date,attr"`
}

type Location

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

type Package

type Package struct {
	Name     string `xml:"name,attr"`
	Epoch    string `xml:"epoch,attr"`
	Version  string `xml:"version,attr"`
	Release  string `xml:"release,attr"`
	Arch     string `xml:"arch,attr"`
	Filename string `xml:"filename"`
}

type Reference

type Reference struct {
	Href  string `xml:"href,attr"`
	ID    string `xml:"id,attr"`
	Title string `xml:"title,attr"`
	Type  string `xml:"type,attr"`
}

type Repo

type Repo struct {
	Type            string   `xml:"type,attr"`
	Checksum        Checksum `xml:"checksum"`
	OpenChecksum    Checksum `xml:"open-checksum"`
	Location        Location `xml:"location"`
	Timestamp       int      `xml:"timestamp"`
	DatabaseVersion int      `xml:"database_version"`
	Size            int      `xml:"size"`
	OpenSize        int      `xml:"open-size"`
}

type RepoMD

type RepoMD struct {
	XMLNS    string `xml:"xmlns,attr"`
	XMLRPM   string `xml:"xmlns rpm,attr"`
	Revision int    `xml:"revision"`
	RepoList []Repo `xml:"data"`
}

func (*RepoMD) Repo

func (md *RepoMD) Repo(t RepoType, mirror string) (*Repo, error)

Repo returns a Repo struct per the specified RepoType. If a mirror url is provided a fully qualified Repo.Location.Href is returned A ErrRepoNotFound error is returned if the RepoType cannot be located.

type RepoType

type RepoType string
const (
	PrimaryDB  RepoType = "primary_db"
	OtherDB    RepoType = "other_db"
	GroupGZ    RepoType = "group_gz"
	Group      RepoType = "group"
	FileLists  RepoType = "filelists_db"
	UpdateInfo RepoType = "updateinfo"
)

type Update

type Update struct {
	Author      string      `xml:"author,attr"`
	From        string      `xml:"from,attr"`
	Status      string      `xml:"status,attr"`
	Type        string      `xml:"type,attr"`
	Version     string      `xml:"version,attr"`
	ID          string      `xml:"id"`
	Title       string      `xml:"title"`
	Issued      DateElem    `xml:"issued"`
	Updated     DateElem    `xml:"updated"`
	Severity    string      `xml:"severity"`
	Description string      `xml:"description"`
	References  []Reference `xml:"references>reference"`
	Packages    []Package   `xml:"pkglist>collection>package"`
}

type Updates

type Updates struct {
	Updates []Update `xml:"update"`
}

Jump to

Keyboard shortcuts

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