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

docs

package
v0.33.6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package docs generates docs from CRD specs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flatten

func Flatten(key string, src extv1.JSONSchemaProps) (map[string]*Object, error)

Flatten parses the JSON Schema and returns a flattened list of referenced objects

func Load

Load parses CRD document from Yaml spec

func LoadTemplates

func LoadTemplates() (*template.Template, error)

LoadTemplates would load all templates from `./templates`

Types

type Atomic

type Atomic struct {
	Format string
	Type   string
}

Atomic is a base type

func (*Atomic) ExplainFormat

func (a *Atomic) ExplainFormat() *string

ExplainFormat returns a human readable explanation for a known format, i.e. date-time

type Object

type Object struct {
	ID          string
	Description string
	Properties  map[string]*Property
}

Object is a simplified representation of JSON Schema Object

type ObjectOrAtomic

type ObjectOrAtomic struct {
	// ObjectRef if set, represents a reference to an object key
	ObjectRef *string
	// Atomic if set, represents an atomic type
	Atomic *Atomic
}

ObjectOrAtomic represents either an object reference or an atomic value

type Property

type Property struct {
	ID          string
	Description string
	Required    bool

	ObjectOrAtomic
	Map *ObjectOrAtomic
}

Property is an Object property, that may be either an atomic value, reference to an object or a map

Directories

Path Synopsis
Package main is a top level command that generates CRD documentation to the stdout
Package main is a top level command that generates CRD documentation to the stdout

Jump to

Keyboard shortcuts

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