types

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 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 Package

type Package struct {
	Name             string `ini:"pkgname"`
	Version          string `ini:"pkgver"`
	Arch             string `ini:"arch"`
	Description      string `ini:"pkgdesc"`
	License          string `ini:"license"`
	Origin           string `ini:"origin"`
	Maintainer       string `ini:"maintainer"`
	URL              string `ini:"url"`
	Checksum         []byte
	Dependencies     []string `ini:"depend,,allowshadow"`
	Provides         []string `ini:"provides,,allowshadow"`
	InstallIf        []string
	Size             uint64 `ini:"size"`
	InstalledSize    uint64
	ProviderPriority uint64 `ini:"provider_priority"`
	BuildTime        time.Time
	BuildDate        int64    `ini:"builddate"`
	RepoCommit       string   `ini:"commit"`
	Replaces         []string `ini:"replaces,,allowshadow"`
	DataHash         string   `ini:"datahash"`
}

Package represents a single package with the information present in an APKINDEX.

func (*Package) ChecksumString

func (p *Package) ChecksumString() string

ChecksumString returns a human-readable version of the control section checksum.

func (*Package) Filename

func (p *Package) Filename() string

Filename returns the package filename as it's named in a repository.

func (*Package) PackageName

func (p *Package) PackageName() string

func (*Package) String

func (p *Package) String() string

type PackageInfo

type PackageInfo struct {
	Name             string   `ini:"pkgname"`
	Version          string   `ini:"pkgver"`
	Arch             string   `ini:"arch"`
	Description      string   `ini:"pkgdesc"`
	License          string   `ini:"license"`
	Origin           string   `ini:"origin"`
	Maintainer       string   `ini:"maintainer"`
	URL              string   `ini:"url"`
	Dependencies     []string `ini:"depend,,allowshadow"`
	Provides         []string `ini:"provides,,allowshadow"`
	InstallIf        []string `ini:"install_if,,allowshadow"`
	Size             uint64   `ini:"size"`
	ProviderPriority uint64   `ini:"provider_priority"`
	BuildDate        int64    `ini:"builddate"`
	RepoCommit       string   `ini:"commit"`
	Replaces         []string `ini:"replaces,,allowshadow"`
	DataHash         string   `ini:"datahash"`
	Triggers         []string `ini:"triggers,,allowshadow"`
}

PackageInfo represents the information present in .PKGINFO.

func ParsePackageInfo

func ParsePackageInfo(info io.Reader) (*PackageInfo, error)

ParsePackageInfo parses the given reader containing the contents of a .PKGINFO file and returns a PackageInfo struct.

func (*PackageInfo) AsPackage

func (pkginfo *PackageInfo) AsPackage(controlHash []byte, size uint64) *Package

AsPackage converts PackageInfo to a Package struct with the given controlHash and size.

Jump to

Keyboard shortcuts

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