validate

package
v0.0.0-...-0f541f5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdValidate

func NewCmdValidate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdValidate creates the `validate` command

Types

type ValidateOptions

type ValidateOptions struct {
	genericclioptions.IOStreams

	Validator     validation.Schema
	Builder       *resource.Builder
	Mapper        meta.RESTMapper
	DynamicClient dynamic.Interface
	OpenAPISchema openapi.Resources

	KarmadaClient karmadaversioned.Interface

	Namespace        string
	EnforceNamespace bool

	FilenameOptions resource.FilenameOptions
	Selector        string
	// contains filtered or unexported fields
}

ValidateOptions defines flags and other configuration parameters for the `validate` command

func NewValidateOptions

func NewValidateOptions(ioStreams genericclioptions.IOStreams) *ValidateOptions

NewValidateOptions creates new ApplyOptions for the `validate` command

func (*ValidateOptions) Complete

func (o *ValidateOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error

Complete verifies if ValidateOptions are valid and without conflicts.

func (*ValidateOptions) GetObjects

func (o *ValidateOptions) GetObjects() ([]*resource.Info, error)

GetObjects returns a (possibly cached) version of all the valid objects to apply as a slice of pointer to resource.Info and an error if one or more occurred. IMPORTANT: This function can return both valid objects AND an error, since "ContinueOnError" is set on the builder. This function should not be called until AFTER the "complete" and "validate" methods have been called to ensure that the ValidateOptions is filled in and valid.

func (*ValidateOptions) Run

func (o *ValidateOptions) Run() error

Run executes the `validate` command.

Jump to

Keyboard shortcuts

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