apt

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: AGPL-3.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package apt synthesises an in-memory apt archive for a single synthetic suite: a signed InRelease, a gzipped Packages index, and the input .debs. The archive signs itself with an ephemeral key generated per archive; KeyID and PublicKey expose what a client needs to trust it. Match and Serve answer the paths an apt client (chisel included) requests for the suite. The exact fields and paths here are dictated by chisel's internal/archive reader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	Suite     string // used as suite, codename and component alike
	Component string
	Arch      string
	// contains filtered or unexported fields
}

Archive is the synthesised, signed archive for one suite.

func New

func New(suite, arch string, pkgs []*deb.Package) (*Archive, error)

New synthesises and signs the archive with a fresh ephemeral key. suite names the suite/codename and the single component.

func (*Archive) KeyID

func (a *Archive) KeyID() string

KeyID returns the long key id of the signing key, in the form a chisel.yaml public-key `id:` field takes.

func (*Archive) Match

func (a *Archive) Match(path string) bool

Match reports whether path targets this archive's suite.

func (*Archive) Packages

func (a *Archive) Packages() []*deb.Package

Packages returns the input packages.

func (*Archive) PublicKey

func (a *Archive) PublicKey() (string, error)

PublicKey returns the signing key's public half as an armored block.

func (*Archive) Serve

func (a *Archive) Serve(path string) (body []byte, contentType string, ok bool)

Serve returns the body for a matched path. ok is false for a path within the suite that has no content (a local 404).

Jump to

Keyboard shortcuts

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