v2

package
v0.29.12 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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
}

Jump to

Keyboard shortcuts

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