printer

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFormattedDescriptionsKey = "_formatted_descriptions"
)
View Source
const GraphVisualizationServiceURL = "http://graph.flyte.org/#"

Variables

This section is empty.

Functions

func FormatParameterDescriptions added in v0.2.26

func FormatParameterDescriptions(parameterMap map[string]*core.Parameter)

func FormatVariableDescriptions added in v0.2.26

func FormatVariableDescriptions(variableMap map[string]*core.Variable)

func OutputFormats

func OutputFormats() []string

Types

type Column

type Column struct {
	Header   string
	JSONPath string
	// Optional Truncation directive to limit content. This will simply truncate the string output.
	TruncateTo *int
}

type OutputFormat

type OutputFormat uint8
const (
	OutputFormatTABLE OutputFormat = iota
	OutputFormatJSON
	OutputFormatYAML
	OutputFormatDOT
	OutputFormatDOTURL
)

func OutputFormatString

func OutputFormatString(s string) (OutputFormat, error)

OutputFormatString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func OutputFormatValues

func OutputFormatValues() []OutputFormat

OutputFormatValues returns all values of the enum

func (OutputFormat) IsAOutputFormat

func (i OutputFormat) IsAOutputFormat() bool

IsAOutputFormat returns "true" if the value is listed in the enum definition. "false" otherwise

func (OutputFormat) MarshalJSON

func (i OutputFormat) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for OutputFormat

func (OutputFormat) MarshalYAML

func (i OutputFormat) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for OutputFormat

func (*OutputFormat) Set added in v0.3.24

func (i *OutputFormat) Set(val string) error

Set implements PFlag's Value interface to attempt to set the value of the flag from string.

func (OutputFormat) String

func (i OutputFormat) String() string

func (OutputFormat) Type added in v0.3.24

func (i OutputFormat) Type() string

Type implements PFlag's Value interface to return type name.

func (*OutputFormat) UnmarshalJSON

func (i *OutputFormat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OutputFormat

func (*OutputFormat) UnmarshalYAML

func (i *OutputFormat) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for OutputFormat

type PrintableProto

type PrintableProto struct {
	proto.Message
}

func (PrintableProto) MarshalJSON

func (p PrintableProto) MarshalJSON() ([]byte, error)

type Printer

type Printer struct{}

func (Printer) JSONToTable

func (p Printer) JSONToTable(jsonRows []byte, columns []Column) error

func (Printer) Print

func (p Printer) Print(format OutputFormat, columns []Column, messages ...proto.Message) error

func (Printer) PrintInterface added in v0.2.13

func (p Printer) PrintInterface(format OutputFormat, columns []Column, v interface{}) error

Jump to

Keyboard shortcuts

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