Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
QueryContents returns a list of packages that contain the given files.
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 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)
Click to show internal directories.
Click to hide internal directories.