rpm

package module
v0.0.0-...-2e908f7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finder

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

Finder is the object that locates RPMs below a given base directory

func NewFinder

func NewFinder(path string) *Finder

NewFinder creates a new RPM Finder object

func (*Finder) Find

func (f *Finder) Find(project, platform string) (*RPMs, error)

Find is the method that finds RPMs

func (*Finder) SrcDir

func (f *Finder) SrcDir() string

SrcDir returns the path to the root directory below which RPMs are found

type RPM

type RPM struct {
	Path string
	Size int64
}

RPM is the basic wrapper around the given RPM path

func New

func New(path string) (*RPM, error)

New creates an RPM instance for the RPM at the given path

func (*RPM) LocalDependencies

func (r *RPM) LocalDependencies() (*RPMs, error)

LocalDependencies finds only those dependencies that are in the same directory as the RPM

func (*RPM) Name

func (r *RPM) Name() string

Name returns the name of the RPM

func (*RPM) NameStartsWith

func (r *RPM) NameStartsWith(prefix string) bool

NameStartsWith indicates if the RPM name has the given prefix

type RPMs

type RPMs []*RPM

RPMs is a collection of RPM instances

func (*RPMs) Names

func (r *RPMs) Names() []string

Names returns the names of each of the RPM instances

func (*RPMs) Paths

func (r *RPMs) Paths() []string

Paths returns the paths to each of the RPM instances

func (*RPMs) ZeroSize

func (r *RPMs) ZeroSize() []string

ZeroSize returns the list of those RPMs that are empty length

type Repo

type Repo struct {
	Name    string
	Label   string
	URL     string
	Prefix  string
	Enabled bool
}

Repo represents an RPM repository

func (Repo) Filename

func (r Repo) Filename() string

Filename returns the file name into which this repo will write its description

func (Repo) String

func (r Repo) String() string

type Repos

type Repos []Repo

Repos is a collection of RPM repo instances

Jump to

Keyboard shortcuts

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