alpine

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

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

func (*AlpinePackage) Open

func (p *AlpinePackage) Open(filename string) (File, error)

func (*AlpinePackage) Size

func (p *AlpinePackage) Size(filename string) (int64, error)

type File

type File interface {
	io.Reader
	io.ReaderAt
	io.Closer
}

Jump to

Keyboard shortcuts

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