rpm

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RepositoryPublicKey  = "repository.key"
	RepositoryPrivateKey = "private.key"
)
View Source
const Name = "rpm"

Variables

This section is empty.

Functions

func SignPackage

func SignPackage(rpm *buffer.HashedBuffer, privateKey string) (reader io.Reader, signSize int64, original int64, err error)

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 Client

type Client interface {
	packages.Client
	Repo(ctx context.Context) (string, error)
}

func NewClient

func NewClient(registry, repository string, opts ...hclient.Option) (Client, error)

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:"isExecutable" 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:"sourceRPM,omitempty"`
	BuildHost     string `json:"buildHost,omitempty"`
	BuildTime     uint64 `json:"buildTime,omitempty"`
	FileTime      uint64 `json:"fileTime,omitempty"`
	InstalledSize uint64 `json:"installedSize,omitempty"`
	ArchiveSize   uint64 `json:"archiveSize,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 {
	PkgName         string           `json:"name"`
	PkgVersion      string           `json:"version"`
	VersionMetadata *VersionMetadata `json:"versionMetadata"`
	FileMetadata    *FileMetadata    `json:"fileMetadata"`
	HashSHA256      string           `json:"hashSha256"`
	FileSize        int64            `json:"size"`
	FilePath        string           `json:"filePath"`
	// contains filtered or unexported fields
}

func NewPackage

func NewPackage(r io.Reader, size int64, key string) (*Package, error)

func (*Package) Arch

func (p *Package) Arch() string

func (*Package) Close

func (p *Package) Close() error

func (*Package) Digest

func (p *Package) Digest() digest.Digest

func (*Package) Name

func (p *Package) Name() string

func (*Package) Path

func (p *Package) Path() string

func (*Package) Read

func (p *Package) Read(b []byte) (int, error)

func (*Package) Size

func (p *Package) Size() int64

func (*Package) Version

func (p *Package) Version() string

type RepoChecksum

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

type RepoData

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

type RepoLocation

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

type Repomd

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

type SetupArgs

type SetupArgs struct {
	User     string
	Password string
	Scheme   string
	Host     string
	Path     string
	Name     string
}

type VersionMetadata

type VersionMetadata struct {
	ProjectURL  string `json:"projectURL,omitempty"`
	Summary     string `json:"summary,omitempty"`
	Description string `json:"description,omitempty"`
	License     string `json:"license,omitempty"`
}

Jump to

Keyboard shortcuts

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