programfeedtest

package
v0.0.0-...-27e7fae Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: GPL-3.0 Imports: 16 Imported by: 0 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 programfeedtest builds signed program-feed bundles for tests: a fresh offline root and online key per Builder, so no key is ever committed and no test reaches the network. Bundles the collector itself wrote are in pkg/programfeed/testdata/collector.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Record

func Record(source, slug string, inScope, outOfScope []string, asOf time.Time) map[string]any

Record is a valid v1 program record "<source>:<slug>" with published in-scope targets and out-of-scope targets.

Types

type Builder

type Builder struct {
	RootPriv   ed25519.PrivateKey
	OnlinePriv ed25519.PrivateKey
	// KeySetVersion is the version of the key set it signs (default 1).
	KeySetVersion uint64
	// LocalOnly marks the manifest local-only (an unsigned self-hoster
	// build the signed-feed path must refuse).
	LocalOnly bool
	Now       time.Time
}

Builder writes bundles signed by its keys.

func New

func New(t *testing.T, now time.Time) *Builder

New returns a builder with fresh keys.

func (*Builder) RootKeyID

func (b *Builder) RootKeyID() string

RootKeyID is the id the platform pins.

func (*Builder) Write

func (b *Builder) Write(t *testing.T, sequence uint64, programs []map[string]any) string

Write writes a snapshot bundle of program records (with an empty change log) at sequence to a new directory and returns it.

Jump to

Keyboard shortcuts

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