Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SinkToString ¶
func SinkToString(sink duckv1.Destination) string
SinkToString prepares a sink for list output
Types ¶
type ListPrintFlags ¶
type ListPrintFlags struct { GenericPrintFlags *genericclioptions.PrintFlags HumanReadableFlags *commands.HumanPrintFlags PrinterHandler func(h hprinters.PrintHandler) }
ListFlags composes common printer flag structs used in the list command.
func NewListPrintFlags ¶
func NewListPrintFlags(printer func(h hprinters.PrintHandler)) *ListPrintFlags
NewListFlags returns flags associated with humanreadable, template, and "name" printing, with default values set.
func (*ListPrintFlags) AddFlags ¶
func (f *ListPrintFlags) AddFlags(cmd *cobra.Command)
AddFlags receives a *cobra.Command reference and binds flags related to humanreadable and template printing.
func (*ListPrintFlags) AllowedFormats ¶
func (f *ListPrintFlags) AllowedFormats() []string
AllowedFormats is the list of formats in which data can be displayed
func (*ListPrintFlags) EnsureWithNamespace ¶
func (f *ListPrintFlags) EnsureWithNamespace()
EnsureWithNamespace ensures that humanreadable flags return a printer capable of printing with a "namespace" column.
func (*ListPrintFlags) ToPrinter ¶
func (f *ListPrintFlags) ToPrinter() (hprinters.ResourcePrinter, error)
ToPrinter attempts to find a composed set of ListTypesFlags suitable for returning a printer based on current flag values.
type SinkFlags ¶
type SinkFlags struct {
// contains filtered or unexported fields
}
func (*SinkFlags) AddWithFlagName ¶
AddWithFlagName configures sink flag with given flag name and a short flag name pass empty short flag name if you dont want to set one
func (*SinkFlags) ResolveSink ¶
func (i *SinkFlags) ResolveSink(ctx context.Context, knclient clientdynamic.KnDynamicClient, namespace string) (*duckv1.Destination, error)
ResolveSink returns the Destination referred to by the flags in the acceptor. It validates that any object the user is referring to exists.