printers

package
v0.3.27 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SelectedFields is used to identify fields specifically selected in a SQL query
	SelectedFields = "selected"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// TableFields describe table field columns
	TableFields TableFieldsMap
	// Out think, os.Stdout
	Out io.Writer
	// ErrOut think, os.Stderr
	ErrOut io.Writer
}

Config provides information required filter item list by query.

func (*Config) JSON

func (c *Config) JSON(items []unstructured.Unstructured) error

JSON prints items in JSON format

func (*Config) Name

func (c *Config) Name(items []unstructured.Unstructured) error

Name prints items in Name format

func (*Config) Table

func (c *Config) Table(items []unstructured.Unstructured) error

Table prints items in Table format

func (*Config) YAML

func (c *Config) YAML(items []unstructured.Unstructured) error

YAML prints items in YAML format

type TableField added in v0.3.16

type TableField struct {
	Title    string `json:"title"`
	Name     string `json:"name"`
	Width    int
	Template string
}

TableField describes how to print the SQL results table.

type TableFieldsMap

type TableFieldsMap map[string]tableFields

TableFieldsMap a map of lists of table field descriptions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳