{"modulePath":"github.com/openctemio/openctem/api","version":"v0.0.0-20261107202920-27e7faec6f5d","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package programfeedtest\n\nPackage 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.\n\n## Functions\n\n```go\nfunc Record(source, slug string, inScope, outOfScope []string, asOf time.Time) map[string]any\n```\nRecord is a valid v1 program record \"\\\u003csource\u003e:\\\u003cslug\u003e\" with published in-scope targets and out-of-scope targets.\n\n## Types\n\n```go\ntype Builder struct {\n\tRootPriv   ed25519.PrivateKey\n\tOnlinePriv ed25519.PrivateKey\n\t// KeySetVersion is the version of the key set it signs (default 1).\n\tKeySetVersion uint64\n\t// LocalOnly marks the manifest local-only (an unsigned self-hoster\n\t// build the signed-feed path must refuse).\n\tLocalOnly bool\n\tNow       time.Time\n}\n```\nBuilder writes bundles signed by its keys.\n\n```go\nfunc New(t *testing.T, now time.Time) *Builder\n```\nNew returns a builder with fresh keys.\n\n```go\nfunc (b *Builder) RootKeyID() string\n```\nRootKeyID is the id the platform pins.\n\n```go\nfunc (b *Builder) Write(t *testing.T, sequence uint64, programs []map[string]any) string\n```\nWrite writes a snapshot bundle of program records (with an empty change log) at sequence to a new directory and returns it.\n\n","path":"github.com/openctemio/openctem/api/pkg/programfeed/programfeedtest","name":"programfeedtest","synopsis":"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.","isRedistributable":true}
