Documentation ¶
Index ¶
- func SinkToString(sink duckv1.Destination) string
- type EventtypeFlags
- type ListPrintFlags
- type SinkFlags
- type SourceTypeFilters
- type Traffic
- func (t *Traffic) Add(cmd *cobra.Command)
- func (t *Traffic) AddTagFlag(cmd *cobra.Command)
- func (t *Traffic) AddTrafficFlag(cmd *cobra.Command)
- func (t *Traffic) AddUntagFlag(cmd *cobra.Command)
- func (t *Traffic) Changed(cmd *cobra.Command) bool
- func (t *Traffic) PercentagesChanged(cmd *cobra.Command) bool
- func (t *Traffic) TagsChanged(cmd *cobra.Command) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SinkToString ¶ added in v0.13.0
func SinkToString(sink duckv1.Destination) string
SinkToString prepares a Sink for list output
Types ¶
type EventtypeFlags ¶ added in v0.30.0
func (*EventtypeFlags) Add ¶ added in v0.30.0
func (e *EventtypeFlags) Add(cmd *cobra.Command)
type ListPrintFlags ¶ added in v0.12.0
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 ¶ added in v0.12.0
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 ¶ added in v0.12.0
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 ¶ added in v0.12.0
func (f *ListPrintFlags) AllowedFormats() []string
AllowedFormats is the list of formats in which data can be displayed
func (*ListPrintFlags) EnsureWithNamespace ¶ added in v0.12.0
func (f *ListPrintFlags) EnsureWithNamespace()
EnsureWithNamespace ensures that humanreadable flags return a printer capable of printing with a "namespace" column.
func (*ListPrintFlags) ToPrinter ¶ added in v0.12.0
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 ¶ added in v0.11.0
type SinkFlags struct { Sink string SinkMappings map[string]schema.GroupVersionResource }
func NewSinkFlag ¶ added in v0.38.0
func NewSinkFlag(mapping map[string]schema.GroupVersionResource) *SinkFlags
NewSinkFlag is a constructor function to create SinkFlags from provided map
func (*SinkFlags) Add ¶ added in v0.11.0
Add configures Sink flag with name 'Sink' amd short name 's'
func (*SinkFlags) AddWithFlagName ¶ added in v0.17.1
AddWithFlagName configures Sink flag with given flag name and a short flag name pass empty short flag name if you don't want to set one
func (*SinkFlags) ResolveSink ¶ added in v0.11.0
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.
type SourceTypeFilters ¶ added in v0.13.0
type SourceTypeFilters struct {
Filters []string
}
SourceTypeFilters defines flags used for kn source list to filter sources on types
type Traffic ¶
type Traffic struct { RevisionsPercentages []string RevisionsTags []string UntagRevisions []string }
func (*Traffic) AddTagFlag ¶ added in v0.28.0
AddTagFlag adds the flag --tag to the command
func (*Traffic) AddTrafficFlag ¶ added in v0.28.0
AddTrafficFlag adds the flag --traffic to the command
func (*Traffic) AddUntagFlag ¶ added in v0.28.0
AddUntagFlag adds the flag --untag to the command