common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CliIdentity string

Functions

func NewVersionCmd added in v0.34.3

func NewVersionCmd() *cobra.Command

Types

type CommonOptions

type CommonOptions struct {
	Out            io.Writer
	Err            io.Writer
	Cmd            *cobra.Command
	Args           []string
	BatchMode      bool
	Verbose        bool
	Staging        bool
	ConfigIdentity string
	Timeout        int
	Identity       string
}

CommonOptions contains common options and helper methods

func (*CommonOptions) AddCommonFlags

func (options *CommonOptions) AddCommonFlags(cmd *cobra.Command)

func (*CommonOptions) GetContext

func (options *CommonOptions) GetContext() (context.Context, func())

func (*CommonOptions) GetFilter

func (options *CommonOptions) GetFilter() *string

func (*CommonOptions) Printf

func (options *CommonOptions) Printf(format string, args ...interface{})

func (*CommonOptions) Println

func (options *CommonOptions) Println(s interface{})

func (*CommonOptions) TimeoutContext

func (options *CommonOptions) TimeoutContext() (context.Context, context.CancelFunc)

type OptionsProvider

type OptionsProvider func() CommonOptions

func NewOptionsProvider

func NewOptionsProvider(out, err io.Writer) OptionsProvider

type Printer

type Printer interface {
	Printf(format string, args ...interface{})
	Println(val interface{})
}

Jump to

Keyboard shortcuts

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