flags

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SinkPrefixes = map[string]schema.GroupVersionResource{
	"broker": {
		Resource: "brokers",
		Group:    "eventing.knative.dev",
		Version:  "v1alpha1",
	},
	"service": {
		Resource: "services",
		Group:    "serving.knative.dev",
		Version:  "v1alpha1",
	},

	"svc": {
		Resource: "services",
		Group:    "serving.knative.dev",
		Version:  "v1alpha1",
	},
}

SinkPrefixes maps prefixes used for sinks to their GroupVersionResources.

Functions

This section is empty.

Types

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 {
	// contains filtered or unexported fields
}

func (*SinkFlags) Add added in v0.11.0

func (i *SinkFlags) Add(cmd *cobra.Command)

func (*SinkFlags) ResolveSink added in v0.11.0

func (i *SinkFlags) ResolveSink(knclient kn_dynamic.KnDynamicClient, namespace string) (*duckv1beta1.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 Traffic

type Traffic struct {
	RevisionsPercentages []string
	RevisionsTags        []string
	UntagRevisions       []string
}

func (*Traffic) Add

func (t *Traffic) Add(cmd *cobra.Command)

func (*Traffic) Changed

func (t *Traffic) Changed(cmd *cobra.Command) bool

func (*Traffic) PercentagesChanged

func (t *Traffic) PercentagesChanged(cmd *cobra.Command) bool

func (*Traffic) TagsChanged

func (t *Traffic) TagsChanged(cmd *cobra.Command) bool

Jump to

Keyboard shortcuts

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