types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MPL-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	// Package is the name of the package.
	Package string
	// Source is the source package name.
	Source string
	// Version is the version of the package.
	Version version.Version
	// InstalledSize is the installed size of the package, in kilobytes.
	InstalledSize int `json:"Installed-Size,omitempty,string"`
	// Maintainer is the person or organization responsible for the package.
	Maintainer string
	// Architecture is the architecture the package is built for.
	Architecture arch.Arch
	// MultiArch is the multi-architecture hint for the package.
	// Valid values are "same", "foreign", or the name of an architecture.
	MultiArch string `json:"Multi-Arch"`
	// Replaces lists packages that this package replaces.
	Replaces dependency.Dependency
	// Breaks lists packages that this package breaks.
	Breaks dependency.Dependency
	// Provides lists virtual packages that this package provides.
	Provides dependency.Dependency
	// Conflicts lists packages that conflict with this package.
	Conflicts dependency.Dependency
	// Enhances lists packages that this package enhances.
	Enhances dependency.Dependency
	// Depends lists packages that this package depends on.
	Depends dependency.Dependency
	// Recommends lists packages that are recommended to be installed with this package.
	Recommends dependency.Dependency
	// Suggests lists packages that are suggested to be installed with this package.
	Suggests dependency.Dependency
	// PreDepends lists packages that must be installed and configured before this package.
	PreDepends dependency.Dependency `json:"Pre-Depends"`
	// Description provides a short description of the package.
	Description string
	// Homepage is the URL of the package's homepage.
	Homepage string
	// Tag lists tags associated with the package.
	Tag list.CommaDelimited[string]
	// Section categorizes the package within the archive.
	Section string
	// Priority defines the importance of the package.
	Priority string
	// Essential is true if the package is essential for the system to function.
	Essential *boolean.Boolean `json:",omitempty"`
	// Important is true if the package is important for the system to function.
	// This is a less strict version of Essential.
	Important *boolean.Boolean `json:",omitempty"`
	// Protected is true if the package is protected. Protected packages contain
	// mostly important system boot infrastructure.
	Protected *boolean.Boolean `json:",omitempty"`
	// Filename is the name of the package file.
	Filename string
	// Size is the size of the package file, in bytes.
	Size int `json:",omitempty,string"`
	// MD5sum is the MD5 checksum of the package file.
	MD5sum string
	// SHA256 is the SHA-256 checksum of the package file.
	SHA256 string

	// Status is the package status.
	Status list.SpaceDelimited[string] `json:",omitempty"`
	// ConfigVersion is the version of the package to which the configuration
	// files belong.
	ConfigVersion *version.Version `json:"Config-Version,omitempty"`
	// Conffiles lists configuration files that are part of the package.
	Conffiles list.NewLineDelimited[string] `json:",omitempty"`
}

Package represents a Debian package.

func (Package) Compare

func (a Package) Compare(b Package) int

func (Package) ID

func (p Package) ID() string

ID returns a unique identifier for the package.

type Release

type Release struct {
	// Origin is the origin of the release.
	Origin string
	// Label is the label of the release.
	Label string
	// Suite is the suite of the release.
	Suite string
	// Version is the version of the release.
	Version string
	// Codename is the codename of the release.
	Codename string
	// Changelogs is the URL to the changelogs for the release.
	Changelogs string
	// Date is the date the release was published.
	Date time.Time
	// ValidUntil is the date the release is valid until.
	ValidUntil time.Time `json:"Valid-Until"`
	// Architectures lists the architectures supported by the release.
	Architectures list.SpaceDelimited[arch.Arch]
	// Components lists the components available in the release.
	Components list.SpaceDelimited[string]
	// Description is a description of the release.
	Description string
	// SHA256 lists SHA-256 checksums for files in the release.
	SHA256 list.NewLineDelimited[filehash.FileHash]
}

Release represents a Debian release.

func (*Release) SHA256Sums

func (r *Release) SHA256Sums() (map[string][]byte, error)

SHA256Sums returns a map of SHA-256 checksums for files in the release.

Directories

Path Synopsis
Package dependency provides an interface to parse and inspect Debian * Dependency relationships.
Package dependency provides an interface to parse and inspect Debian * Dependency relationships.

Jump to

Keyboard shortcuts

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