cmd

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdPodnet

func NewCmdPodnet(streams genericclioptions.IOStreams) *cobra.Command

NewCmdPodnet provides a cobra command wrapping NamespaceOptions

Types

type PodNetDefaultOutput

type PodNetDefaultOutput struct {
	Namespace string   `json:"namespace"`
	Pod       string   `json:"pod"`
	Net       string   `json:"net"`
	Interface string   `json:"interface"`
	Address   []string `json:"address"`
	Mac       string   `json:"mac"`
}

PodNetDefaultOutput is intermediate representation of output.

func (*PodNetDefaultOutput) ConvertRow

func (p *PodNetDefaultOutput) ConvertRow() []interface{}

ConvertRow convets PodNetDefaultOutput to TableRow's interface structure

func (*PodNetDefaultOutput) ConvertWideRow

func (p *PodNetDefaultOutput) ConvertWideRow() []interface{}

ConvertWideRow convets PodNetDefaultOutput to TableRow's interface structure

type PodnetOptions

type PodnetOptions struct {
	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

PodnetOptions provides ...

func NewPodnetOptions

func NewPodnetOptions(streams genericclioptions.IOStreams) *PodnetOptions

NewPodnetOptions provides an instance of NamespaceOptions with default values

func (*PodnetOptions) Complete

func (o *PodnetOptions) Complete(cmd *cobra.Command, args []string) error

Complete sets all information required for updating the current context

func (*PodnetOptions) Run

func (o *PodnetOptions) Run() error

Run lists all available namespaces on a user's KUBECONFIG or updates the current context based on a provided namespace.

func (*PodnetOptions) ShowDefaultOutput

func (o *PodnetOptions) ShowDefaultOutput() error

ShowDefaultOutput shows default (non DeviceInfo result)

func (*PodnetOptions) ShowDefaultOutputJSON

func (o *PodnetOptions) ShowDefaultOutputJSON(output []PodNetDefaultOutput) error

ShowDefaultOutputJSON outputs PodNetDefaultOutput in json

func (*PodnetOptions) ShowDefaultOutputText

func (o *PodnetOptions) ShowDefaultOutputText(rows []metav1.TableRow) error

ShowDefaultOutputText outputs TableRow, converted from PodNetDefaultOutput, in text

func (*PodnetOptions) ShowWideOutputText

func (o *PodnetOptions) ShowWideOutputText(rows []metav1.TableRow) error

ShowWideOutputText outputs TableRow, converted from PodNetWideOutput, in wide text

func (*PodnetOptions) Validate

func (o *PodnetOptions) Validate() error

Validate ensures that all required arguments and flag values are provided

Jump to

Keyboard shortcuts

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