genericclioptions

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagOutputFormat = "output"
)

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(cmd *cobra.Command) error

InitConfig reads in config file and ENV variables if set.

Types

type ClientGetter

type ClientGetter interface {
	// ToConfig returns config
	ToConfig() *config.Config
	// ToDiscoveryClient returns discovery client
	ToChoreoClient() (choreoclient.Client, error)
	// ToDiscoveryClient returns discovery client
	ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
	// ToResourceMapper returns a restmapper
	ToResourceMapper() (resourcemapper.Mapper, error)
	// ToResourceClient returns resource client
	ToResourceClient() (resourceclient.Client, error)
	// ToBranchClient returns branch client
	ToBranchClient() (branchclient.Client, error)
	// ToRunnerClient returns runner client
	ToRunnerClient() (runnerclient.Client, error)
	// TosnapshotClient returns snapshot client
	ToSnapshotClient() (snapshotclient.Client, error)
	// Branch()
	ToBranch() string
	// Proxy()
	ToProxy() types.NamespacedName
}

type ConfigFlags

type ConfigFlags struct {
	Debug               *bool
	Address             *string
	CRDPath             *string
	DBPath              *string
	ReconcilerPath      *string
	LibraryPath         *string
	PostProcessingPath  *string
	OutputPath          *string
	InputPath           *string
	RefsPath            *string
	MaxRcvMsg           *int
	Timeout             *int
	CacheDir            *string
	Output              *string
	Config              *string
	ConfigEnvPrefix     *string
	InternalReconcilers *bool
	Branch              *string
	Proxy               *string
}

func NewConfigFlags

func NewConfigFlags() *ConfigFlags

NewConfigFlags returns ConfigFlags with default values set

func (*ConfigFlags) AddClientFlags

func (r *ConfigFlags) AddClientFlags(fs *pflag.FlagSet)

func (*ConfigFlags) AddServerControllerFlags

func (r *ConfigFlags) AddServerControllerFlags(fs *pflag.FlagSet)

func (*ConfigFlags) ToBranch

func (r *ConfigFlags) ToBranch() string

func (*ConfigFlags) ToBranchClient

func (r *ConfigFlags) ToBranchClient() (branchclient.Client, error)

func (*ConfigFlags) ToChoreoClient added in v0.0.9

func (r *ConfigFlags) ToChoreoClient() (choreoclient.Client, error)

func (*ConfigFlags) ToConfig

func (r *ConfigFlags) ToConfig() *config.Config

func (*ConfigFlags) ToDiscoveryClient

func (r *ConfigFlags) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)

func (*ConfigFlags) ToProxy added in v0.0.9

func (r *ConfigFlags) ToProxy() types.NamespacedName

func (*ConfigFlags) ToResourceClient

func (r *ConfigFlags) ToResourceClient() (resourceclient.Client, error)

func (*ConfigFlags) ToResourceMapper

func (r *ConfigFlags) ToResourceMapper() (resourcemapper.Mapper, error)

func (*ConfigFlags) ToRunnerClient

func (r *ConfigFlags) ToRunnerClient() (runnerclient.Client, error)

func (*ConfigFlags) ToSnapshotClient added in v0.0.11

func (r *ConfigFlags) ToSnapshotClient() (snapshotclient.Client, error)

type IOStreams

type IOStreams struct {
	// In think, os.Stdin
	In io.Reader
	// Out think, os.Stdout
	Out io.Writer
	// ErrOut think, os.Stderr
	ErrOut io.Writer
}

Jump to

Keyboard shortcuts

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