Documentation
¶
Overview ¶
Package bootstrap verifies the catalog generation embedded in the binary.
Index ¶
- Constants
- func DecodePayload(compressed []byte, descriptor catalogs.PayloadDescriptor) ([]byte, error)
- func Embedded() (*catalogs.Catalog, catalogs.BootstrapManifest, error)
- func EncodePayload(payload []byte) ([]byte, error)
- func Generation() (catalogs.Generation, error)
- func GenerationManifest() (catalogs.GenerationManifest, error)
- func InspectExports(ctx context.Context, path string) (resultErr error)
- func InspectRetainedBaselinePublications(ctx context.Context, files map[string]BaselineRetainedFile, ...) ([]string, error)
- func Load(reader catalogs.Reader) (catalogs.BootstrapManifest, error)
- func NewEmbeddedBuilder() (*catalogs.Builder, error)
- type BaselineRecordReader
- type BaselineRecovery
- type BaselineRetainedFile
- type ExportResult
Constants ¶
const BaselineRecoveryDirectoryName = baselineRecoveryDirectory
BaselineRecoveryDirectoryName identifies the journal directory within a baseline export tree.
const PayloadFilename = "generation-payload.json.gz"
PayloadFilename names the generated compressed canonical catalog.
Variables ¶
This section is empty.
Functions ¶
func DecodePayload ¶ added in v0.17.0
func DecodePayload(compressed []byte, descriptor catalogs.PayloadDescriptor) ([]byte, error)
DecodePayload bounds decompression and verifies the exact canonical byte descriptor.
func Embedded ¶ added in v0.2.0
func Embedded() (*catalogs.Catalog, catalogs.BootstrapManifest, error)
Embedded returns the process-wide verified immutable bootstrap catalog and its digest-bound manifest. The catalog is safe to retain across goroutines. Verification and JSON decoding run once because the embedded filesystem cannot change during a process lifetime.
func EncodePayload ¶ added in v0.17.0
EncodePayload compresses canonical bytes with deterministic gzip metadata.
func Generation ¶
func Generation() (catalogs.Generation, error)
Generation returns an owned copy of the process-wide verified embedded generation. Encoding and validation run once because embedded bytes cannot change in this process.
func GenerationManifest ¶ added in v0.17.0
func GenerationManifest() (catalogs.GenerationManifest, error)
GenerationManifest returns verified embedded evidence without copying the payload. The caller owns the manifest and all its collections.
func InspectExports ¶ added in v0.17.0
InspectExports validates a private tree of completed baseline exports without writes. The caller must fence writers and verify the complete inventory before and after inspection. This check refuses journals and unfinished stages, which require separate recovery. A valid export does not establish provenance, authority, or permission to activate it.
func InspectRetainedBaselinePublications ¶ added in v0.17.0
func InspectRetainedBaselinePublications(ctx context.Context, files map[string]BaselineRetainedFile, read BaselineRecordReader) ([]string, error)
InspectRetainedBaselinePublications selects matching baseline stages for inactive retention. The inventory includes the baseline files and the separate recovery directory. The caller preserves selected files and every recovery record in inactive evidence. Completed exports require separate validation. This check never promotes staging bytes or authorizes native cleanup.
func Load ¶
func Load(reader catalogs.Reader) (catalogs.BootstrapManifest, error)
Load parses embedded generation metadata and verifies it against the exact canonical bytes produced by the embedded catalog.
func NewEmbeddedBuilder ¶ added in v0.7.0
NewEmbeddedBuilder composes the repository-owned embedded filesystem with a catalog builder. Callers that only need the verified immutable generation should use Embedded.
Types ¶
type BaselineRecordReader ¶ added in v0.17.0
type BaselineRecordReader = privatefiles.RetainedRecordReader
BaselineRecordReader reads bounded metadata from a verified backup.
type BaselineRecovery ¶ added in v0.17.0
type BaselineRecovery struct {
RecoveredOperations int `json:"recovered_operations"`
PreservedPaths []string `json:"preserved_paths,omitempty"`
}
BaselineRecovery reports completed recovery operations and paths that recovery preserves. Preserved paths are relative to the baseline directory. They require separate ownership review.
type BaselineRetainedFile ¶ added in v0.17.0
type BaselineRetainedFile = privatefiles.RetainedFile
BaselineRetainedFile identifies captured bytes in a verified baseline inventory.
type ExportResult ¶ added in v0.17.0
type ExportResult struct {
GenerationID string `json:"generation_id"`
Directory string `json:"directory"`
Created bool `json:"created"`
Recovery BaselineRecovery `json:"recovery"`
}
ExportResult identifies the installed baseline export and its recovery outcomes.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package budget measures the checked-in catalog and applies release policy.
|
Package budget measures the checked-in catalog and applies release policy. |
|
Package manifest derives embedded generation identity from canonical catalog bytes without rewriting unchanged generations.
|
Package manifest derives embedded generation identity from canonical catalog bytes without rewriting unchanged generations. |