schema

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 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 schema carries the schema command, which prints the JSON Schema of one kubectl-nv kind, and the generator behind "make schema" that keeps the checked-in copies of those schemas in step with the code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDrift

func CheckDrift(registry *output.SchemaRegistry, dir string) error

CheckDrift reports every way the schemas checked in under dir disagree with what the registry generates: a file that differs, a kind with no file, and a file no kind claims. All three are reported at once, because fixing them one error message at a time is three runs of the suite.

The checked-in schemas are the published contract. A consumer validates against the file in the repository, not against a binary it does not have, so a file that no longer matches the code is a contract that lies.

func NewCommand

func NewCommand(o *cmd.Options) *cobra.Command

NewCommand builds the schema command over the registry the other commands register their kinds into.

func WriteAll

func WriteAll(registry *output.SchemaRegistry, dir string) ([]string, error)

WriteAll writes one <kind>.json per registered kind into dir and returns the paths it wrote, in the order it wrote them. It is what "make schema" runs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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