options

package
v0.4.27 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHiddenOptionsGroup added in v0.4.22

func AddHiddenOptionsGroup(cmd *cobra.Command, group *HiddenOptionsGroup)

func AddPreRunE

func AddPreRunE(c *cobra.Command, f func(*cobra.Command, []string) error)

Types

type ClientOpts

type ClientOpts struct {
	client.Config
	AuthNotRequired bool
	DefaultTimeout  int
}

func (*ClientOpts) GetAPIClient

func (opts *ClientOpts) GetAPIClient() client.Interface

func (*ClientOpts) GetAPIClientConfig

func (opts *ClientOpts) GetAPIClientConfig() *client.Config

func (*ClientOpts) GetOrganization

func (opts *ClientOpts) GetOrganization() string

func (*ClientOpts) GetUnauthenticatedAPIClient

func (opts *ClientOpts) GetUnauthenticatedAPIClient() client.Interface

func (*ClientOpts) IsAuthenticated added in v0.4.24

func (opts *ClientOpts) IsAuthenticated() bool

func (*ClientOpts) Register

func (opts *ClientOpts) Register(cmd *cobra.Command)

func (*ClientOpts) SetContextValues added in v0.4.4

func (opts *ClientOpts) SetContextValues(context map[string]string)

type ClusterOpts

type ClusterOpts struct {
	ClientOpts
	ClusterID         string
	ClusterIDOptional bool
	SetClusterID      string
}

func (*ClusterOpts) GetClusterID

func (opts *ClusterOpts) GetClusterID() string

func (*ClusterOpts) Register

func (opts *ClusterOpts) Register(cmd *cobra.Command)

func (*ClusterOpts) SetContextValues added in v0.4.4

func (opts *ClusterOpts) SetContextValues(context map[string]string)

type HiddenOptionsGroup added in v0.4.22

type HiddenOptionsGroup struct {
	Use         string
	Description string
	OptionNames []string
}

type Interface

type Interface interface {
	Register(cmd *cobra.Command)
	SetContextValues(context map[string]string)
}

type PrintClientOpts

type PrintClientOpts struct {
	PrintOpts
	ClientOpts
}

func (*PrintClientOpts) Register

func (opts *PrintClientOpts) Register(cmd *cobra.Command)

func (*PrintClientOpts) SetContextValues added in v0.4.4

func (opts *PrintClientOpts) SetContextValues(context map[string]string)

type PrintClusterOpts

type PrintClusterOpts struct {
	PrintOpts
	ClusterOpts
}

func (*PrintClusterOpts) Register

func (opts *PrintClusterOpts) Register(cmd *cobra.Command)

func (*PrintClusterOpts) SetContextValues added in v0.4.4

func (opts *PrintClusterOpts) SetContextValues(context map[string]string)

type PrintOpts

type PrintOpts struct {
	OutputFormat        string
	DefaultOutputFormat string
	NoHeaders           bool
	Wide                bool
	Path                []string
	Columns             []string
	WideColumns         []string
	DiffColumn          string
	VersionColumn       string
	SortBy              []string
	DefaultSortBy       []string
	Limit               int
	Filter              string
	Formatters          map[string]print.Formatter
	ComputedColumns     map[string]print.ColumnFunction
	DiffContextSize     int
	ExitErrorNotEmtpy   bool
	// contains filtered or unexported fields
}

func (*PrintOpts) GetPrinter added in v0.4.7

func (p *PrintOpts) GetPrinter() (print.Interface, error)

func (*PrintOpts) PrintResult

func (p *PrintOpts) PrintResult(result *jnode.Node)

func (*PrintOpts) Register

func (p *PrintOpts) Register(cmd *cobra.Command)

func (*PrintOpts) SetColumnFunction added in v0.4.17

func (p *PrintOpts) SetColumnFunction(columnName string, computer print.ColumnFunction)

func (*PrintOpts) SetContextValues added in v0.4.4

func (p *PrintOpts) SetContextValues(context map[string]string)

func (*PrintOpts) SetFormatter

func (p *PrintOpts) SetFormatter(columnName string, formatter print.Formatter)

Jump to

Keyboard shortcuts

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