rpmrepository

package
v0.0.0-...-acfd9b1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checksum

type Checksum struct {
	Type  string `xml:"type,attr"`
	Value string `xml:",chardata"`
	Pkgid string `xml:"pkgid,attr,omitempty"`
}

type File

type File struct {
	Type  string `xml:"type,attr,omitempty"`
	Value string `xml:",chardata"`
}

type Filelists

type Filelists struct {
	XMLName  xml.Name           `xml:"filelists"`
	Packages int                `xml:"packages"`
	Package  []FilelistsPackage `xml:"package"`
	Xmlns    string             `xml:"xmlns,attr"`
}

type FilelistsPackage

type FilelistsPackage struct {
	File []File `xml:"file"`
	Package
}

type Location

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

type Other

type Other struct {
	XMLName  xml.Name       `xml:"otherdata"`
	Packages int            `xml:"packages"`
	Package  []OtherPackage `xml:"package"`
	Xmlns    string         `xml:"xmlns,attr"`
}

type OtherChangelog

type OtherChangelog struct {
	Author string `xml:"author,attr"`
	Date   string `xml:"date,attr"`
	Value  string `xml:",chardata"`
}

type OtherPackage

type OtherPackage struct {
	Changelog []OtherChangelog `xml:"changelog"`
	Package
}

type Package

type Package struct {
	Version      Version `xml:"version"`
	Architecture string  `xml:"arch,attr"`
	Pkgid        string  `xml:"pkgid,attr"`
	Name         string  `xml:"name,attr"`
}

type PackageInfo

type PackageInfo struct {
	Path string
	rpm.PackageFile
}

type PackageInfos

type PackageInfos map[string]PackageInfo

type Primary

type Primary struct {
	XMLName  xml.Name         `xml:"metadata"`
	Packages int              `xml:"packages,attr"`
	Package  []PrimaryPackage `xml:"package"`
	Xmlns    string           `xml:"xmlns,attr"`
	Xmlnsrpm string           `xml:"xmlns:rpm,attr"`
}

type PrimaryFormat

type PrimaryFormat struct {
	License     string                   `xml:"rpm:license"`
	Vendor      string                   `xml:"rpm:vendor"`
	Groups      []string                 `xml:"rpm:group"`
	Buildhost   string                   `xml:"rpm:buildhost"`
	SourceRPM   string                   `xml:"rpm:sourcerpm"`
	HeaderRange PrimaryFormatHeaderRange `xml:"rpm:heander-range"`
	Provides    []PrimaryFormatEntry     `xml:"rpm:provides>rpm:entry"`
	Requires    []PrimaryFormatEntry     `xml:"rpm:requires>rpm:entry"`
	Conflicts   []PrimaryFormatEntry     `xml:"rpm:conflicts>rpm:entry"`
	Files       []File                   `xml:"file"`
}

type PrimaryFormatEntry

type PrimaryFormatEntry struct {
	Name    string `xml:"name,attr"`
	Flags   string `xml:"flags,attr,omitempty"`
	Epoch   string `xml:"epoch,attr,omitempty"`
	Version string `xml:"ver,attr,omitempty"`
	Release string `xml:"rel,attr,omitempty"`
	Pre     string `xml:"pre,attr,omitempty"`
}

type PrimaryFormatHeaderRange

type PrimaryFormatHeaderRange struct {
	Start uint64 `xml:"start,attr"`
	End   uint64 `xml:"end,attr"`
}

type PrimaryPackage

type PrimaryPackage struct {
	Type         string        `xml:"type,attr"`
	Name         string        `xml:"name"`
	Architecture string        `xml:"arch"`
	Version      Version       `xml:"version"`
	Checksum     Checksum      `xml:"checksum"`
	Summary      string        `xml:"summary"`
	Description  string        `xml:"description"`
	Packager     string        `xml:"packager"`
	URL          string        `xml:"url"`
	Time         PrimaryTime   `xml:"time"`
	Size         PrimarySize   `xml:"size"`
	Format       PrimaryFormat `xml:"format"`
	Location     Location      `xml:"location"`
}

type PrimarySize

type PrimarySize struct {
	Package   uint64 `xml:"package,attr"`
	Installed uint64 `xml:"installed,attr"`
	Archived  uint64 `xml:"archived,attr"`
}

type PrimaryTime

type PrimaryTime struct {
	File  int64 `xml:"file,attr"`
	Build int64 `xml:"build,attr"`
}

type RepoData

type RepoData map[string][]byte

type Repomd

type Repomd struct {
	XMLName  xml.Name     `xml:"repomd"`
	Revision int64        `xml:"revision"`
	Data     []RepomdData `xml:"data"`
	Xmlns    string       `xml:"xmlns,attr"`
	XmlnsRpm string       `xml:"xmlns:rpm,attr"`
}

type RepomdData

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

type RepomdRequirements

type RepomdRequirements struct {
	Size     int
	OpenSize int
	Sum      string
	OpenSum  string
}

type RpmRepo

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

func NewRpmBuilder

func NewRpmBuilder(config *config.ServiceConfigBuilder) *RpmRepo

func (*RpmRepo) CreateBaseDir

func (r *RpmRepo) CreateBaseDir() error

CreateBaseDir - creates base directory

func (*RpmRepo) CreateRepoData

func (r *RpmRepo) CreateRepoData(packages PackageInfos) (RepoData, error)

func (*RpmRepo) Dump

func (r *RpmRepo) Dump(data RepoData, distroName string, version string, arch string) error

func (*RpmRepo) GetFilelists

func (r *RpmRepo) GetFilelists(packages PackageInfos) Filelists

func (*RpmRepo) GetOther

func (r *RpmRepo) GetOther(packages PackageInfos) Other

func (*RpmRepo) GetPrimary

func (r *RpmRepo) GetPrimary(packages PackageInfos) Primary

func (*RpmRepo) GetRepomd

func (r *RpmRepo) GetRepomd(in map[string]RepomdRequirements) Repomd

func (*RpmRepo) GetXML

func (r *RpmRepo) GetXML(in interface{}) (out []byte, size int, checksum string, err error)

func (*RpmRepo) GetZip

func (r *RpmRepo) GetZip(in []byte) (out []byte, size int, checksum string)

func (*RpmRepo) ReadFlags

func (r *RpmRepo) ReadFlags(f int) string

func (*RpmRepo) ReindexPackages

func (r *RpmRepo) ReindexPackages() error

ReindexPackages - reindex packages on repository server

func (*RpmRepo) Repository

func (r *RpmRepo) Repository(uploaded []byte, uploadedName string, distroName string, version string, arch string) error

func (*RpmRepo) SavePackage

func (r *RpmRepo) SavePackage(data io.Reader, pkg string, distroName string, version string, arch string) error

SavePackage - saves uploaded package in repository

type Version

type Version struct {
	Epoch   int    `xml:"epoch,attr"`
	Version string `xml:"ver,attr"`
	Release string `xml:"rel,attr"`
}

Jump to

Keyboard shortcuts

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