rpm

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PropertyMetadata     = "rpm.metadata"
	PropertyGroup        = "rpm.group"
	PropertyArchitecture = "rpm.architecture"

	SettingKeyPrivate = "rpm.key.private"
	SettingKeyPublic  = "rpm.key.public"

	RepositoryPackage = "_rpm"
	RepositoryVersion = "_repository"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Changelog

type Changelog struct {
	Author string             `json:"author,omitempty" xml:"author,attr"`
	Date   timeutil.TimeStamp `json:"date,omitempty" xml:"date,attr"`
	Text   string             `json:"text,omitempty" xml:",chardata"`
}

type Collection

type Collection struct {
	Short    string           `xml:"short,attr" json:"short"`
	Packages []*UpdatePackage `xml:"package" json:"packages"`
}

type DateAttr

type DateAttr struct {
	Date string `xml:"date,attr" json:"date"`
}

type Entry

type Entry struct {
	Name    string `json:"name" xml:"name,attr"`
	Flags   string `json:"flags,omitempty" xml:"flags,attr,omitempty"`
	Version string `json:"version,omitempty" xml:"ver,attr,omitempty"`
	Epoch   string `json:"epoch,omitempty" xml:"epoch,attr,omitempty"`
	Release string `json:"release,omitempty" xml:"rel,attr,omitempty"`
}

type File

type File struct {
	Path         string `json:"path" xml:",chardata"`
	Type         string `json:"type,omitempty" xml:"type,attr,omitempty"`
	IsExecutable bool   `json:"is_executable" xml:"-"`
}

type FileMetadata

type FileMetadata struct {
	Architecture  string `json:"architecture,omitempty"`
	Epoch         string `json:"epoch,omitempty"`
	Version       string `json:"version,omitempty"`
	Release       string `json:"release,omitempty"`
	Vendor        string `json:"vendor,omitempty"`
	Group         string `json:"group,omitempty"`
	Packager      string `json:"packager,omitempty"`
	SourceRpm     string `json:"source_rpm,omitempty"`
	BuildHost     string `json:"build_host,omitempty"`
	BuildTime     uint64 `json:"build_time,omitempty"`
	FileTime      uint64 `json:"file_time,omitempty"`
	InstalledSize uint64 `json:"installed_size,omitempty"`
	ArchiveSize   uint64 `json:"archive_size,omitempty"`

	Provides  []*Entry `json:"provide,omitempty"`
	Requires  []*Entry `json:"require,omitempty"`
	Conflicts []*Entry `json:"conflict,omitempty"`
	Obsoletes []*Entry `json:"obsolete,omitempty"`

	Files []*File `json:"files,omitempty"`

	Changelogs []*Changelog `json:"changelogs,omitempty"`
}

type Package

type Package struct {
	Name            string
	Version         string
	VersionMetadata *VersionMetadata
	FileMetadata    *FileMetadata
}

func ParsePackage

func ParsePackage(r io.Reader) (*Package, error)

ParsePackage parses the RPM package file

type Reference

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

type Update

type Update struct {
	From        string        `xml:"from,attr" json:"from"`
	Status      string        `xml:"status,attr" json:"status"`
	Type        string        `xml:"type,attr" json:"type"`
	Version     string        `xml:"version,attr" json:"version"`
	ID          string        `xml:"id" json:"id"`
	Title       string        `xml:"title" json:"title"`
	Severity    string        `xml:"severity" json:"severity"`
	Description string        `xml:"description" json:"description"`
	Issued      *DateAttr     `xml:"issued" json:"issued"`
	Updated     *DateAttr     `xml:"updated" json:"updated"`
	References  []*Reference  `xml:"references>reference" json:"references"`
	PkgList     []*Collection `xml:"pkglist>collection" json:"pkg_list"`
}

type UpdatePackage

type UpdatePackage struct {
	Arch     string `xml:"arch,attr" json:"arch"`
	Name     string `xml:"name,attr" json:"name"`
	Release  string `xml:"release,attr" json:"release"`
	Src      string `xml:"src,attr" json:"src"`
	Version  string `xml:"version,attr" json:"version"`
	Filename string `xml:"filename" json:"filename"`
}

type VersionMetadata

type VersionMetadata struct {
	License     string    `json:"license,omitempty"`
	ProjectURL  string    `json:"project_url,omitempty"`
	Summary     string    `json:"summary,omitempty"`
	Description string    `json:"description,omitempty"`
	Updates     []*Update `json:"updates,omitempty"`
}

Jump to

Keyboard shortcuts

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