cmdutils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteAliases = []string{
	"rm",
}
View Source
var ListAliases = []string{
	"ls",
}

Functions

func AddColumnsFlag

func AddColumnsFlag(cmd *cobra.Command, fields fields.Fields)

func AddLimitFlag

func AddLimitFlag(cmd *cobra.Command, limit *int32)

func AddOutputOnlyIDFlag

func AddOutputOnlyIDFlag(cmd *cobra.Command)

func AddSortByAndReverseFlags

func AddSortByAndReverseFlags(cmd *cobra.Command, sortType string, fields fields.Fields)

func ArgsToNumericalIDs

func ArgsToNumericalIDs(args []string) ([]int32, error)

func CheckFlagValue

func CheckFlagValue(flagName string, flagValue string, valid gmap.GenericMap) error

func DeleteMultiple

func DeleteMultiple(ids []int32, deleteFunc DeleteFunc) error

func DeleteMultipleChildResources

func DeleteMultipleChildResources(parentID int32, ids []int32, deleteFunc DeleteFuncChildResource) error

func DeleteMultipleStringID

func DeleteMultipleStringID(ids []string, deleteFunc DeleteFuncStringID) error

func MarkFlagRequired

func MarkFlagRequired(cmd *cobra.Command, flag string)

func SetArgsCompletionFunc

func SetArgsCompletionFunc(cmd *cobra.Command, f CompletionCoreFunc)

func SetFlagCompletionFunc

func SetFlagCompletionFunc(cmd *cobra.Command, flagName string, f CompletionCoreFunc)

func SetFlagCompletionValues

func SetFlagCompletionValues(cmd *cobra.Command, flagName string, values ...string)

Types

type CompletionCoreFunc

type CompletionCoreFunc func(cmd *cobra.Command, args []string, toComplete string) []string

type DeleteFunc

type DeleteFunc func(int32) error

type DeleteFuncChildResource

type DeleteFuncChildResource func(int32, int32) error

type DeleteFuncStringID

type DeleteFuncStringID func(string) error

Jump to

Keyboard shortcuts

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