cmd

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OutputFormatIds = map[OutputFormat][]string{
	JSON: {"json"},
	YAML: {"yaml"},
	NAME: {"name"},
}

Functions

func ApplyResources added in v0.6.0

func ApplyResources(resources []resource.Resource,
	applyFunc func(*resource.Resource, bool) (string, error),
	logFunc func(resource.Resource, string, error),
	dryRun bool,
	maxParallel int) []struct {
	Resource     resource.Resource
	UpsertResult string
	Err          error
}

Globally accessible for testing purposes

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type MultipleFlags added in v0.4.0

type MultipleFlags struct {
	// contains filtered or unexported fields
}

func NewMultipleFlags added in v0.4.0

func NewMultipleFlags(command *cobra.Command, flagParams map[string]schema.FlagParameterOption) *MultipleFlags

func (*MultipleFlags) ExtractFlagValueForBodyParam added in v0.4.0

func (m *MultipleFlags) ExtractFlagValueForBodyParam() map[string]interface{}

func (*MultipleFlags) ExtractFlagValueForQueryParam added in v0.4.0

func (m *MultipleFlags) ExtractFlagValueForQueryParam() map[string]string

type OutputFormat added in v0.3.0

type OutputFormat enumflag.Flag
const (
	JSON OutputFormat = iota
	YAML
	NAME
)

func (OutputFormat) String added in v0.3.0

func (o OutputFormat) String() string

Jump to

Keyboard shortcuts

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