Documentation ¶
Index ¶
- func ConnectToYugaware(ctx *YWClientContext) (*client.YugawareClient, error)
- func GetLogger(module string, debug bool) (logr.Logger, error)
- func WaitForTaskCompletion(ctx context.Context, ywclient *client.YugawareClient, waitTask *models.YBPTask) error
- type CommandOptions
- type YWClientContext
- func (ctx *YWClientContext) Setup() error
- func (ctx *YWClientContext) SetupNoClient() error
- func (ctx *YWClientContext) WithCmd(cmd *cobra.Command) *YWClientContext
- func (ctx *YWClientContext) WithGlobalOptions(options *YWGlobalOptions) *YWClientContext
- func (ctx *YWClientContext) WithOptions(options CommandOptions) *YWClientContext
- func (ctx *YWClientContext) WithVFS(fs vfs.Filesystem) *YWClientContext
- type YWGlobalOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToYugaware ¶
func ConnectToYugaware(ctx *YWClientContext) (*client.YugawareClient, error)
func WaitForTaskCompletion ¶
Types ¶
type CommandOptions ¶
type CommandOptions interface { AddFlags(cmd *cobra.Command) Validate(ctx *YWClientContext) error }
type YWClientContext ¶
type YWClientContext struct { context.Context Log logr.Logger Cmd *cobra.Command GlobalOptions *YWGlobalOptions CommandOptions CommandOptions Fs vfs.Filesystem Client *client.YugawareClient }
func NewCommandContext ¶
func NewCommandContext() *YWClientContext
func (*YWClientContext) Setup ¶
func (ctx *YWClientContext) Setup() error
func (*YWClientContext) SetupNoClient ¶
func (ctx *YWClientContext) SetupNoClient() error
func (*YWClientContext) WithCmd ¶
func (ctx *YWClientContext) WithCmd(cmd *cobra.Command) *YWClientContext
func (*YWClientContext) WithGlobalOptions ¶
func (ctx *YWClientContext) WithGlobalOptions(options *YWGlobalOptions) *YWClientContext
func (*YWClientContext) WithOptions ¶
func (ctx *YWClientContext) WithOptions(options CommandOptions) *YWClientContext
func (*YWClientContext) WithVFS ¶
func (ctx *YWClientContext) WithVFS(fs vfs.Filesystem) *YWClientContext
type YWGlobalOptions ¶
type YWGlobalOptions struct { Debug bool `mapstructure:"debug"` Output string `mapstructure:"output"` Hostname string `mapstructure:"hostname"` DialTimeout int `mapstructure:"dialtimeout"` SkipHostVerification bool `mapstructure:"skiphostverification"` CACert string `mapstructure:"cacert"` ClientCert string `mapstructure:"client_cert"` ClientKey string `mapstructure:"client_key"` APIToken string `mapstructure:"api_token"` }
func (*YWGlobalOptions) AddFlags ¶
func (o *YWGlobalOptions) AddFlags(cmd *cobra.Command)
func (*YWGlobalOptions) Validate ¶
func (o *YWGlobalOptions) Validate(_ *YWClientContext) error
Click to show internal directories.
Click to hide internal directories.