options

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPreRunE

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

Types

type ClientOpts

type ClientOpts struct {
	client.Config
	AuthNotRequired bool
}

func (*ClientOpts) GetAPIClient

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

func (*ClientOpts) GetAPIClientConfig

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

func (*ClientOpts) GetClientOpts

func (opts *ClientOpts) GetClientOpts() *ClientOpts

func (*ClientOpts) GetOrganization

func (opts *ClientOpts) GetOrganization() string

func (*ClientOpts) GetUnauthenticatedAPIClient

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

func (*ClientOpts) Register

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

type ClusterOpts

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

func (*ClusterOpts) GetClusterID

func (opts *ClusterOpts) GetClusterID() string

func (*ClusterOpts) GetClusterOpts

func (opts *ClusterOpts) GetClusterOpts() *ClusterOpts

func (*ClusterOpts) Register

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

type Formatter

type Formatter func(n *jnode.Node, columnName string) string

type HasClientOpts

type HasClientOpts interface {
	GetClientOpts() *ClientOpts
}

type HasClusterOpts

type HasClusterOpts interface {
	GetClusterOpts() *ClusterOpts
}

type HasPrintOpts

type HasPrintOpts interface {
	GetPrintOpts() *PrintOpts
}

type Interface

type Interface interface {
	Register(cmd *cobra.Command)
}

type PrintClientOpts

type PrintClientOpts struct {
	PrintOpts
	ClientOpts
}

func (*PrintClientOpts) Register

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

type PrintClusterOpts

type PrintClusterOpts struct {
	PrintOpts
	ClusterOpts
}

func (*PrintClusterOpts) Register

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

type PrintOpts

type PrintOpts struct {
	Output      io.Writer
	Full        bool
	Wide        bool
	Path        []string
	Columns     []string
	WideColumns []string
	SortBy      []string
	Formatters  map[string]Formatter
	Transformer func(*jnode.Node) *jnode.Node
	// contains filtered or unexported fields
}

func (*PrintOpts) AddTransformer

func (p *PrintOpts) AddTransformer(t func(*jnode.Node) *jnode.Node)

func (*PrintOpts) Flush

func (p *PrintOpts) Flush()

func (*PrintOpts) Format

func (p *PrintOpts) Format(columnName string, n *jnode.Node) string

func (*PrintOpts) GetOutput

func (p *PrintOpts) GetOutput() io.Writer

func (*PrintOpts) GetPrintOpts

func (p *PrintOpts) GetPrintOpts() *PrintOpts

func (*PrintOpts) PrintHeader

func (p *PrintOpts) PrintHeader()

func (*PrintOpts) PrintResult

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

func (*PrintOpts) PrintResultYAML

func (p *PrintOpts) PrintResultYAML(result interface{})

func (*PrintOpts) PrintRows

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

func (*PrintOpts) Register

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

func (*PrintOpts) RelativeTimestampFormatter

func (p *PrintOpts) RelativeTimestampFormatter(n *jnode.Node, columnName string) string

func (*PrintOpts) SetFormatter

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

func (*PrintOpts) TimestampFormatter

func (p *PrintOpts) TimestampFormatter(n *jnode.Node, columnName string) string

Jump to

Keyboard shortcuts

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