kubectlk8s.io/kubectl/pkg/cmd/explain Index | Files

package explain

import "k8s.io/kubectl/pkg/cmd/explain"

Index

Functions

func NewCmdExplain

func NewCmdExplain(parent string, f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

NewCmdExplain returns a cobra command for swagger docs

Types

type ExplainFlags

type ExplainFlags struct {
	APIVersion   string
	OutputFormat string
	Recursive    bool

	genericiooptions.IOStreams
}

ExplainFlags directly reflect the information that CLI is gathering via flags. They will be converted to Options, which reflect the runtime requirements for the command.

func NewExplainFlags

func NewExplainFlags(streams genericiooptions.IOStreams) *ExplainFlags

NewExplainFlags returns a default ExplainFlags

func (*ExplainFlags) AddFlags

func (flags *ExplainFlags) AddFlags(cmd *cobra.Command)

AddFlags registers flags for a cli

func (*ExplainFlags) ToOptions

func (flags *ExplainFlags) ToOptions(f cmdutil.Factory, parent string, args []string) (*ExplainOptions, error)

ToOptions converts from CLI inputs to runtime input

type ExplainOptions

type ExplainOptions struct {
	genericiooptions.IOStreams

	Recursive  bool
	APIVersion string
	// Name of the template to use with the openapiv3 template renderer.
	OutputFormat string

	CmdParent string

	Mapper meta.RESTMapper

	// Client capable of fetching openapi documents from the user's cluster
	OpenAPIV3Client openapiclient.Client
	// contains filtered or unexported fields
}

func (*ExplainOptions) Run

func (o *ExplainOptions) Run() error

Run executes the appropriate steps to print a model's documentation

func (*ExplainOptions) Validate

func (o *ExplainOptions) Validate() error

Source Files

explain.go

Version
v0.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
12 packages
Last checked
1 month ago

Tools for package owners.