common

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CliIdentity string

Functions

This section is empty.

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 (*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