gen

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	// IsClientSchema controls output mode.
	// If IsClientSchema set to true, then spec will be generated with kustomize
	// validation specifics in mind, and kustomize merge annotations set.
	// In all other cases valid CRD would be produced and all kustomize annotations
	// would be omitted.
	IsClientSchema *bool
}

Plugin transforms input files into OpenAPIv3 schema.

func (Plugin) Run

func (p Plugin) Run(plugin *protogen.Plugin) error

type PluginOption

type PluginOption func(p *Plugin)

func WithClientSchema

func WithClientSchema(isClientSchema bool) PluginOption

type RadixTree added in v1.1.0

type RadixTree[T any] struct {
	// contains filtered or unexported fields
}

func NewRadixTree added in v1.1.0

func NewRadixTree[T any]() *RadixTree[T]

func (*RadixTree[T]) Add added in v1.1.0

func (t *RadixTree[T]) Add(path []string, value T)

func (*RadixTree[T]) Child added in v1.1.0

func (t *RadixTree[T]) Child(item string) *RadixTree[T]

func (*RadixTree[T]) Value added in v1.1.0

func (t *RadixTree[T]) Value() (*T, bool)

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

func (*Schema) OneCrd

func (s *Schema) OneCrd() bool

Jump to

Keyboard shortcuts

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