api

package
v0.0.0-...-184f8a4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnPrinter

type ColumnPrinter interface {
	FindResults(data interface{}) ([][]reflect.Value, error)
	PrintResults(w io.Writer, results []reflect.Value) error
}

type Convertor

type Convertor struct {
	Headers           []metav1.TableColumnDefinition
	AdditionalColumns []ColumnPrinter
}

func NewConverter

func NewConverter(columns []ResourceColumns) *Convertor

func (*Convertor) ConvertToTable

func (c *Convertor) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)

type ResourceColumns

type ResourceColumns struct {
	Name     string
	Type     string
	Format   string
	Priority int32
	JSONPath string
}

type ResourceInfo

type ResourceInfo struct {
	Name         string
	Singular     string
	ListKind     string
	Kind         string
	Scope        apiextensionsv1.ResourceScope
	SubResources sets.Set[string]
	Converter    *Convertor
}

Jump to

Keyboard shortcuts

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