crdschemahistory

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package crdschemahistory verifies that the generated CRD schema identity advances monotonically relative to an exact Git commit. The one exception is a restart the package records, which leaves an exact baseline for version 1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Root                    string
	CandidateDirectory      string
	BaselineRef             string
	RequireExplicitBaseline bool
}

Config selects the repository, generated CRD directory, and Git baseline. An empty BaselineRef enables the documented local-only automatic selection.

type Result

type Result struct {
	BaselineCommit   string
	BaselineSource   string
	BaselineVersion  uint64
	CandidateVersion uint64
	SchemaChanged    bool
	InitialAdoption  bool
	// Restarted reports a transition a recorded restart admitted: the
	// candidate is version 1 of a history that begins at this baseline.
	Restarted bool
}

Result describes the exact history transition that was verified.

func Verify

func Verify(ctx context.Context, config Config) (Result, error)

Verify loads the current generated CRDs from the working tree and their baseline counterparts from Git, then enforces the monotonic schema contract.

Jump to

Keyboard shortcuts

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