Help us shape the future of Go! Take the 2026 Go Developer Survey

schema

package
v0.103.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBrowser

func RunBrowser(streams internal.IO, root *Node) error

RunBrowser launches an interactive schema tree browser on the given IO streams.

Types

type Kind

type Kind int

Kind classifies a schema tree node.

const (
	KindLeaf Kind = iota
	KindStruct
	KindList
)

func (Kind) String

func (k Kind) String() string

type Node

type Node struct {
	Name     string
	Path     string
	Kind     Kind
	Type     string
	Optional bool
	Default  string
	Docs     string
	Children []*Node
	// contains filtered or unexported fields
}

Node is a navigable schema field derived from a cue.Value.

func BuildTree

func BuildTree(value cue.Value, rootName string) (*Node, error)

BuildTree creates a navigable tree rooted at value. Children of non-leaf nodes are populated lazily via Expand.

func (*Node) CanExpand

func (n *Node) CanExpand() bool

func (*Node) Collapse

func (n *Node) Collapse()

func (*Node) Expand

func (n *Node) Expand()

func (*Node) IsExpanded

func (n *Node) IsExpanded() bool

func (*Node) Parent

func (n *Node) Parent() *Node

Jump to

Keyboard shortcuts

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