package v2

import "k8s.io/kubectl/pkg/explain/v2"

Index

Functions

func PrintModelDescription

func PrintModelDescription(
	fieldsPath []string,
	w io.Writer,
	client openapi.Client,
	gvr schema.GroupVersionResource,
	recursive bool,
	outputFormat string,
) error

PrintModelDescription prints the description of a specific model or dot path. If recursive, all components nested within the fields of the schema will be printed.

func WithBuiltinTemplateFuncs

func WithBuiltinTemplateFuncs(tmpl *template.Template) *template.Template

Types

type Generator

type Generator interface {
	AddTemplate(name string, contents string) error

	Render(

		templateName string,

		document map[string]interface{},

		gvr schema.GroupVersionResource,

		fieldSelector []string,

		recursive bool,

		writer io.Writer,
	) error
}

func NewGenerator

func NewGenerator() Generator

type TemplateContext

type TemplateContext struct {
	GVR       schema.GroupVersionResource
	Document  map[string]interface{}
	Recursive bool
	FieldPath []string
}

Source Files

explain.go funcs.go generator.go template.go

Directories

PathSynopsis
pkg/explain/v2/templates
Version
v0.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
15 packages
Last checked
34 minutes ago

Tools for package owners.