Documentation ¶
Index ¶
- Variables
- type Pkg
- type PkgManager
- func (p *PkgManager) DownloadArchive(name, version, directory string) (string, error)
- func (p *PkgManager) Ecosystem() pkgecosystem.Ecosystem
- func (p *PkgManager) ExtractArchive(archivePath, outputDir string) error
- func (p *PkgManager) Latest(name string) (*Pkg, error)
- func (p *PkgManager) Local(name, version, localPath string) *Pkg
- func (p *PkgManager) Package(name, version string) *Pkg
- func (p *PkgManager) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoArchiveURL = errors.New("archive URL not found")
Functions ¶
This section is empty.
Types ¶
type Pkg ¶
type Pkg struct {
// contains filtered or unexported fields
}
func (*Pkg) Ecosystem ¶
func (p *Pkg) Ecosystem() pkgecosystem.Ecosystem
func (*Pkg) EcosystemName ¶
func (*Pkg) Manager ¶
func (p *Pkg) Manager() *PkgManager
type PkgManager ¶
type PkgManager struct {
// contains filtered or unexported fields
}
PkgManager represents how packages from a common ecosystem are accessed.
func Manager ¶
func Manager(e pkgecosystem.Ecosystem) *PkgManager
func (*PkgManager) DownloadArchive ¶
func (p *PkgManager) DownloadArchive(name, version, directory string) (string, error)
DownloadArchive downloads an archive of the given package name and version to the specified directory, and returns the path to the downloaded archive. The archive is named according to ecosystem-specific rules.
directory specifies the destination directory for the archive. If an empty string is passed, the current directory is used.
If an error occurs during download of the file, it is returned along with an empty path value.
func (*PkgManager) Ecosystem ¶
func (p *PkgManager) Ecosystem() pkgecosystem.Ecosystem
func (*PkgManager) ExtractArchive ¶
func (p *PkgManager) ExtractArchive(archivePath, outputDir string) error
func (*PkgManager) Local ¶
func (p *PkgManager) Local(name, version, localPath string) *Pkg
func (*PkgManager) Package ¶
func (p *PkgManager) Package(name, version string) *Pkg
func (*PkgManager) String ¶
func (p *PkgManager) String() string
String implements the Stringer interface to support pretty printing.
Click to show internal directories.
Click to hide internal directories.