deb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithArch

func WithArch(arch string) option

func WithCacheDir

func WithCacheDir(cacheDir string) option

func WithDistribution

func WithDistribution(dist string) option

func WithMirror

func WithMirror(mirror string) option

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewAptClient

func NewAptClient(opts ...option) *Client

func (*Client) Contents

func (a *Client) Contents() (*ContentsReader, error)

Contents returns a ContentsReader for the current distribution and architecture.

func (*Client) Download

func (a *Client) Download(pack Package) (io.ReadCloser, error)

Download returns a ReadCloser representing a stream of the package's data from the mirror.

func (*Client) Packages

func (a *Client) Packages() (*PackageReader, error)

Packages returns a PackageReader for the current distribution and architecture.

func (*Client) QueryContents

func (a *Client) QueryContents(files []string) ([]Contents, error)

QueryContents returns a list of packages that contain the given files.

func (*Client) QueryPackage

func (a *Client) QueryPackage(name string) (Package, error)

QueryPackage returns a package queried by name.

type Contents

type Contents struct {
	File     string
	Packages []string
}

type ContentsReader

type ContentsReader struct {
	// contains filtered or unexported fields
}

func NewContentsReader

func NewContentsReader(r io.Reader) *ContentsReader

func (*ContentsReader) Next

func (c *ContentsReader) Next() (Contents, error)

type Package

type Package struct {
	Name     string
	Source   string
	Filename string
}

type PackageReader

type PackageReader struct {
	// contains filtered or unexported fields
}

func NewPackageReader

func NewPackageReader(r io.Reader) *PackageReader

func (*PackageReader) Next

func (p *PackageReader) Next() (Package, error)

Jump to

Keyboard shortcuts

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