Documentation ¶
Overview ¶
Package clidiscoverysources provides api command helpers and validators to write compatibility tests for CLI Discovery sources apis
Index ¶
- Constants
- func DefaultDeleteCLIDiscoverySourceCommand(version core.RuntimeVersion, opts ...CfgCLIDiscoverySourcesArgsOption) *core.Command
- func DefaultGetCLIDiscoverySourceCommand(version core.RuntimeVersion, opts ...CfgCLIDiscoverySourcesArgsOption) *core.Command
- func DefaultSetCLIDiscoverySourceCommand(version core.RuntimeVersion, opts ...CfgCLIDiscoverySourcesArgsOption) *core.Command
- func NewDeleteCLIDiscoverySourceCommand(inputOpts *DeleteCLIDiscoverySourceInputOptions, ...) (*core.Command, error)
- func NewGetCLIDiscoverySourceCommand(inputOpts *GetCLIDiscoverySourceInputOptions, ...) (*core.Command, error)
- func NewSetCLIDiscoverySourceCommand(inputOpts *SetCLIDiscoverySourceInputOptions, ...) (*core.Command, error)
- type CfgCLIDiscoverySourcesArgs
- type CfgCLIDiscoverySourcesArgsOption
- func WithContextType(contextType types.ContextType) CfgCLIDiscoverySourcesArgsOption
- func WithDiscoverySourceName(name string) CfgCLIDiscoverySourcesArgsOption
- func WithError(e string) CfgCLIDiscoverySourcesArgsOption
- func WithGCPDiscoveryOpts(opts *types.GCPDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
- func WithGenericRESTDiscoveryOpts(opts *types.GenericRESTDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
- func WithKubernetesDiscoveryOpts(opts *types.KubernetesDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
- func WithLocalDiscoveryOpts(opts *types.LocalDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
- func WithOCIDiscoveryOpts(opts *types.OCIDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
- func WithRuntimeAPIVersion(v *core.RuntimeAPIVersion) CfgCLIDiscoverySourcesArgsOption
- func WithStrictValidationStrategy() CfgCLIDiscoverySourcesArgsOption
- func WithValidationStrategy(v core.ValidationStrategy) CfgCLIDiscoverySourcesArgsOption
- type DeleteCLIDiscoverySourceInputOptions
- type DeleteCLIDiscoverySourceOutputOptions
- type GetCLIDiscoverySourceInputOptions
- type GetCLIDiscoverySourceOutputOptions
- type SetCLIDiscoverySourceInputOptions
- type SetCLIDiscoverySourceOutputOptions
Constants ¶
const ( CLIDiscoverySourceNotFound string = "cli discovery source not found" CompatibilityTestsSourceName string = "compatibility-tests-source-name" CompatibilityTestsSourceImage string = "compatibility-tests-source-image" )
Variables ¶
This section is empty.
Functions ¶
func DefaultDeleteCLIDiscoverySourceCommand ¶
func DefaultDeleteCLIDiscoverySourceCommand(version core.RuntimeVersion, opts ...CfgCLIDiscoverySourcesArgsOption) *core.Command
DefaultDeleteCLIDiscoverySourceCommand constructs a default DeleteCLIDiscoverySource command without an error.
func DefaultGetCLIDiscoverySourceCommand ¶
func DefaultGetCLIDiscoverySourceCommand(version core.RuntimeVersion, opts ...CfgCLIDiscoverySourcesArgsOption) *core.Command
DefaultGetCLIDiscoverySourceCommand constructs a default GetCLIDiscoverySource command without an error.
func DefaultSetCLIDiscoverySourceCommand ¶
func DefaultSetCLIDiscoverySourceCommand(version core.RuntimeVersion, opts ...CfgCLIDiscoverySourcesArgsOption) *core.Command
DefaultSetCLIDiscoverySourceCommand constructs a default SetCLIDiscoverySource command without an error.
func NewDeleteCLIDiscoverySourceCommand ¶
func NewDeleteCLIDiscoverySourceCommand(inputOpts *DeleteCLIDiscoverySourceInputOptions, outputOpts *DeleteCLIDiscoverySourceOutputOptions) (*core.Command, error)
NewDeleteCLIDiscoverySourceCommand constructs a command to make a call to specific runtime version DeleteCLIDiscoverySource API Input Parameter inputOpts has all input parameters which are required for Runtime DeleteCLIDiscoverySource API Input Parameter: outputOpts has details about expected output from Runtime DeleteCLIDiscoverySource API call Return: command to execute or error if any validations fails for DeleteCLIDiscoverySourceInputOptions or DeleteCLIDiscoverySourceOutputOptions This method does validate the input parameters DeleteCLIDiscoverySourceInputOptions or DeleteCLIDiscoverySourceOutputOptions based on Runtime API Version For more details about supported parameters refer to DeleteCLIDiscoverySourceInputOptions or DeleteCLIDiscoverySourceOutputOptions definition(and CLIDiscoverySourceOpts struct, which is embedded)
func NewGetCLIDiscoverySourceCommand ¶
func NewGetCLIDiscoverySourceCommand(inputOpts *GetCLIDiscoverySourceInputOptions, outputOpts *GetCLIDiscoverySourceOutputOptions) (*core.Command, error)
NewGetCLIDiscoverySourceCommand constructs a command to make a call to specific runtime version GetCLIDiscoverySource API Input Parameter inputOpts has all input parameters which are required for Runtime GetCLIDiscoverySource API Input Parameter: outputOpts has details about expected output from Runtime GetCLIDiscoverySource API call Return: command to execute or error if any validations fails for GetCLIDiscoverySourceInputOptions or GetCLIDiscoverySourceOutputOptions This method does validate the input parameters GetCLIDiscoverySourceInputOptions or GetCLIDiscoverySourceOutputOptions based on Runtime API Version For more details about supported parameters refer to GetCLIDiscoverySourceInputOptions or GetCLIDiscoverySourceOutputOptions definition(and CLIDiscoverySourceOpts struct, which is embedded)
func NewSetCLIDiscoverySourceCommand ¶
func NewSetCLIDiscoverySourceCommand(inputOpts *SetCLIDiscoverySourceInputOptions, outputOpts *SetCLIDiscoverySourceOutputOptions) (*core.Command, error)
NewSetCLIDiscoverySourceCommand constructs a command to make a call to specific runtime version SetCLIDiscoverySource API Input Parameter inputOpts has all input parameters which are required for Runtime SetCLIDiscoverySource API Input Parameter: outputOpts has details about expected output from Runtime SetCLIDiscoverySource API call Return: command to execute or error if any validations fails for SetCLIDiscoverySourceInputOptions or SetCLIDiscoverySourceOutputOptions This method does validate the input parameters SetCLIDiscoverySourceInputOptions or SetCLIDiscoverySourceOutputOptions based on Runtime API Version For more details about supported parameters refer to SetCLIDiscoverySourceInputOptions or SetCLIDiscoverySourceOutputOptions definition(and CLIDiscoverySourceOpts struct, which is embedded)
Types ¶
type CfgCLIDiscoverySourcesArgs ¶
type CfgCLIDiscoverySourcesArgs struct { *core.RuntimeAPIVersion DiscoverySourceName string PluginDiscoveryOpts *types.PluginDiscoveryOpts // For specific version options look into DiscoverySourceOpts definition ValidationStrategy core.ValidationStrategy Error string }
CfgCLIDiscoverySourcesArgs used to construct input and output options
func DefaultCLIDiscoverySourcePerVersion ¶
func DefaultCLIDiscoverySourcePerVersion(version core.RuntimeVersion) *CfgCLIDiscoverySourcesArgs
DefaultCLIDiscoverySourcePerVersion constructs a default PluginDiscoveryOpts
func NewCfgCLIDiscoverySourcesArgs ¶
func NewCfgCLIDiscoverySourcesArgs(options ...CfgCLIDiscoverySourcesArgsOption) *CfgCLIDiscoverySourcesArgs
type CfgCLIDiscoverySourcesArgsOption ¶
type CfgCLIDiscoverySourcesArgsOption func(*CfgCLIDiscoverySourcesArgs)
func WithContextType ¶
func WithContextType(contextType types.ContextType) CfgCLIDiscoverySourcesArgsOption
func WithDiscoverySourceName ¶
func WithDiscoverySourceName(name string) CfgCLIDiscoverySourcesArgsOption
func WithError ¶
func WithError(e string) CfgCLIDiscoverySourcesArgsOption
func WithGCPDiscoveryOpts ¶
func WithGCPDiscoveryOpts(opts *types.GCPDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
func WithGenericRESTDiscoveryOpts ¶
func WithGenericRESTDiscoveryOpts(opts *types.GenericRESTDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
func WithKubernetesDiscoveryOpts ¶
func WithKubernetesDiscoveryOpts(opts *types.KubernetesDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
func WithLocalDiscoveryOpts ¶
func WithLocalDiscoveryOpts(opts *types.LocalDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
func WithOCIDiscoveryOpts ¶
func WithOCIDiscoveryOpts(opts *types.OCIDiscoveryOpts) CfgCLIDiscoverySourcesArgsOption
func WithRuntimeAPIVersion ¶
func WithRuntimeAPIVersion(v *core.RuntimeAPIVersion) CfgCLIDiscoverySourcesArgsOption
func WithStrictValidationStrategy ¶
func WithStrictValidationStrategy() CfgCLIDiscoverySourcesArgsOption
func WithValidationStrategy ¶
func WithValidationStrategy(v core.ValidationStrategy) CfgCLIDiscoverySourcesArgsOption
type DeleteCLIDiscoverySourceInputOptions ¶
type DeleteCLIDiscoverySourceInputOptions struct { *core.RuntimeAPIVersion // required DiscoverySourceName string // required }
DeleteCLIDiscoverySourceInputOptions used to generate DeleteCLIDiscoverySource command
func (*DeleteCLIDiscoverySourceInputOptions) Validate ¶
func (opts *DeleteCLIDiscoverySourceInputOptions) Validate() (bool, error)
Validate the opts as per runtime version i.e. check whether the expected fields are supported for the runtime version specified
type DeleteCLIDiscoverySourceOutputOptions ¶
type DeleteCLIDiscoverySourceOutputOptions struct { *core.RuntimeAPIVersion // required Error string // expected error message could be the sub string of actual error message }
DeleteCLIDiscoverySourceOutputOptions used to generate DeleteCLIDiscoverySource command
type GetCLIDiscoverySourceInputOptions ¶
type GetCLIDiscoverySourceInputOptions struct { *core.RuntimeAPIVersion // required DiscoverySourceName string // required }
GetCLIDiscoverySourceInputOptions used to generate GetCLIDiscoverySource command
func (*GetCLIDiscoverySourceInputOptions) Validate ¶
func (opts *GetCLIDiscoverySourceInputOptions) Validate() (bool, error)
Validate the opts as per runtime version i.e. check whether the expected fields are supported for the runtime version specified
type GetCLIDiscoverySourceOutputOptions ¶
type GetCLIDiscoverySourceOutputOptions struct { *core.RuntimeAPIVersion // required PluginDiscoveryOpts *types.PluginDiscoveryOpts // For specific version options look into DiscoverySourceOpts definition ValidationStrategy core.ValidationStrategy // Type of validation to be performed i.e. exact or partial. default is partial Error string // expected error message could be the sub string of actual error message }
GetCLIDiscoverySourceOutputOptions used to generate GetCLIDiscoverySource command
func (*GetCLIDiscoverySourceOutputOptions) Validate ¶
func (opts *GetCLIDiscoverySourceOutputOptions) Validate() (bool, error)
Validate the opts as per runtime version i.e. check whether the expected fields are supported for the runtime version specified
type SetCLIDiscoverySourceInputOptions ¶
type SetCLIDiscoverySourceInputOptions struct { *core.RuntimeAPIVersion // required PluginDiscoveryOpts *types.PluginDiscoveryOpts // For specific version options look into DiscoverySourceOpts definition }
SetCLIDiscoverySourceInputOptions used to generate SetCLIDiscoverySource command
func (*SetCLIDiscoverySourceInputOptions) Validate ¶
func (opts *SetCLIDiscoverySourceInputOptions) Validate() (bool, error)
Validate the setDiscoverySourceInputOptions as per runtime version i.e. check whether mandatory fields are set and throw error if missing
type SetCLIDiscoverySourceOutputOptions ¶
type SetCLIDiscoverySourceOutputOptions struct { *core.RuntimeAPIVersion // required Error string // expected error message could be the sub string of actual error message }
SetCLIDiscoverySourceOutputOptions used to generate SetCLIDiscoverySource command