Documentation
¶
Index ¶
- Variables
- type AlpineDownloader
- type AlpinePackage
- func (p *AlpinePackage) Close() error
- func (p *AlpinePackage) GetEntry(filename string) (archive.Entry, bool)
- func (p *AlpinePackage) IsRegularFile(filename string) bool
- func (p *AlpinePackage) ListFiles() []string
- func (p *AlpinePackage) Open(filename string) (File, error)
- func (p *AlpinePackage) Size(filename string) (int64, error)
- type File
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPackageExpired = errors.New("package has expired")
Functions ¶
This section is empty.
Types ¶
type AlpineDownloader ¶
type AlpineDownloader struct {
Mirror string
Version string
Arch string
Repo string
CacheDir string
}
func (*AlpineDownloader) Download ¶
func (d *AlpineDownloader) Download(name string) (*AlpinePackage, error)
func (*AlpineDownloader) DownloadAndGetPath ¶ added in v0.0.2
func (d *AlpineDownloader) DownloadAndGetPath(name string) (cachePath string, pkg *AlpinePackage, err error)
DownloadAndGetPath downloads a package and returns both the package and its cache base path. The cache base path can be used to copy the .idx and .bin files for offline distribution.
func (*AlpineDownloader) SetForArchitecture ¶
func (d *AlpineDownloader) SetForArchitecture(arch hv.CpuArchitecture, cacheDir string) error
type AlpinePackage ¶
type AlpinePackage struct {
// contains filtered or unexported fields
}
func OpenLocalPackage ¶ added in v0.0.2
func OpenLocalPackage(base string) (*AlpinePackage, error)
OpenLocalPackage opens an already-downloaded Alpine package from disk. Used for offline distribution where packages are bundled with the executable. The base path should not include the .idx/.bin extension.
func (*AlpinePackage) Close ¶
func (p *AlpinePackage) Close() error
func (*AlpinePackage) GetEntry ¶ added in v0.0.2
func (p *AlpinePackage) GetEntry(filename string) (archive.Entry, bool)
GetEntry returns the archive entry for a file, if it exists.
func (*AlpinePackage) IsRegularFile ¶ added in v0.0.2
func (p *AlpinePackage) IsRegularFile(filename string) bool
IsRegularFile returns true if the file exists and is a regular file (not a directory or symlink).
func (*AlpinePackage) ListFiles ¶
func (p *AlpinePackage) ListFiles() []string
Click to show internal directories.
Click to hide internal directories.