Documentation
¶
Overview ¶
Package goapt provides go bindings for the APT package management tool.
The bindings allow exploring the APT cache and configuration. They use cgo with a middle layer of C bindings to the underlying C++ code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache represents an APT cache file. An APT cache contains information about available and installed packages, the versions, and to some extend, also configured repositories.
func (*Cache) GetPackage ¶
GetPackage gets the package with the specified ID.
func (*Cache) LookupWithArch ¶
LookupWithArch looks a package up by its name in the cache.
func (*Cache) PackageCount ¶
PackageCount Return the number of packages in the cache.
type Policy ¶
type Policy struct{}
Policy determines the priority of versions of a package.
func (*Policy) CandidateVersion ¶
CandidateVersion returns the candidate version of a package.
type Session ¶
type Session struct{}
Session represents the C++ type pkgCacheFile, a cache with a depcache, a policy, and so on.
func NewSession ¶
NewSession opens a new session. Note that Config() and System() really are global variables. They will be initialized here, but there can only really be one session at one time.
func NewSessionWithConfig ¶
NewSessionWithConfig opens a new session, with the specified configuration set as the global configuration object instead of the default one.