Documentation ¶
Overview ¶
Package parser implements a parser for parsing binhost files, primarily Packages and gpkg files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct { AcceptLicense string `colon:"ACCEPT_LICENSE"` AcceptProperties string `colon:"ACCEPT_PROPERTIES"` AcceptRestrict string `colon:"ACCEPT_RESTRICT"` AcceptKeywords []string `colon:"ACCEPT_KEYWORDS"` Arch string `colon:"ARCH"` CBuild string `colon:"CBUILD"` CHost string `colon:"CHOST"` ConfigProtect []string `colon:"CONFIG_PROTECT"` ConfigProtectMask []string `colon:"CONFIG_PROTECT_MASK"` ELibc string `colon:"ELIBC"` Features []string `colon:"FEATURES"` GentooMirrors string `colon:"GENTOO_MIRRORS"` IUseImplicit string `colon:"IUSE_IMPLICIT"` Kernel string `colon:"KERNEL"` Packages int `colon:"PACKAGES"` Profile string `colon:"PROFILE"` Timestamp int `colon:"TIMESTAMP"` Use string `colon:"USE"` UseExpand []string `colon:"USE_EXPAND"` UseExpandHidden []string `colon:"USE_EXPAND_HIDDEN"` UseExpandImplicit []string `colon:"USE_EXPAND_IMPLICIT"` UseExpandUnprefixed []string `colon:"USE_EXPAND_UNPREFIXED"` UseExpandValuesArch []string `colon:"USE_EXPAND_VALUES_ARCH"` UseExpandValuesELibc []string `colon:"USE_EXPAND_VALUES_ELIBC"` UseExpandValuesKernel []string `colon:"USE_EXPAND_VALUES_KERNEL"` Version int `colon:"VERSION"` // PackageEntries is a slice of packages contained within the index. PackageEntries []Package }
Index is a binhost index file (Packages).
func ParsePackages ¶
ParsePackages parses the provided reader into a the Index type.
func (Index) EncodeInto ¶
EncodeInto serializes the packages into the given writer using the standard Packages format.
type Package ¶
type Package struct { PackageCommon CPV string `colon:"CPV"` Path string `colon:"PATH"` SHA1 string `colon:"SHA1"` MD5 string `colon:"MD5"` ModifiedTime int `colon:"MTIME"` }
Package is a Gentoo binhost package.
type PackageCommon ¶
type PackageCommon struct { BDepends string `colon:"BDEPEND"` BuildID string `colon:"BUILD_ID"` BuildTime string `colon:"BUILD_TIME"` DefinedPhases []string `colon:"DEFINED_PHASES"` EAPI int `colon:"EAPI"` ELibc string `colon:"ELIBC"` IUse string `colon:"IUSE"` Use string `colon:"USE"` Keywords []string `colon:"KEYWORDS"` Licenses []string `colon:"LICENSE"` Slot string `colon:"SLOT"` Depends string `colon:"DEPEND"` IDepend string `colon:"IDEPEND"` PDepends string `colon:"PDEPEND"` RDepends string `colon:"RDEPEND"` Requires []string `colon:"REQUIRES"` Restrict string `colon:"RESTRICT"` Provides []string `colon:"PROVIDES"` Size int `colon:"SIZE"` Repo string `colon:"REPO"` }
PackageCommon is data shared between both a Packages index and the actual package's metadata.tar.xz distributed with it.
Click to show internal directories.
Click to hide internal directories.