validate

package
v0.2.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package validate is used to validate the basic environment for onexctl to run.

Index

Constants

This section is empty.

Variables

View Source
var (
	StatusPass = color.GreenString("Pass")
	StatusFail = color.RedString("Fail")
)

Functions

func NewCmdValidate

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

NewCmdValidate returns new initialized instance of 'validate' sub command.

Types

type ValidateInfo

type ValidateInfo struct {
	Check   string
	Status  string
	Message string
}

ValidateInfo defines the validate information.

func NewPassValidateInfo

func NewPassValidateInfo(check string) ValidateInfo

func (ValidateInfo) Data

func (vi ValidateInfo) Data() []string

type ValidateOptions

type ValidateOptions struct {
	genericiooptions.IOStreams
	// contains filtered or unexported fields
}

ValidateOptions is an options struct to support 'validate' sub command.

func NewValidateOptions

func NewValidateOptions(ioStreams genericiooptions.IOStreams) *ValidateOptions

NewValidateOptions returns an initialized ValidateOptions instance.

func (*ValidateOptions) Complete

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

Complete completes all the required options.

func (*ValidateOptions) Run

func (o *ValidateOptions) Run(f cmdutil.Factory, args []string) error

Run executes a validate sub command using the specified options.

func (*ValidateOptions) Validate

func (o *ValidateOptions) Validate(cmd *cobra.Command, args []string) error

Validate makes sure there is no discrepency in command options.

Jump to

Keyboard shortcuts

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