cmdutil

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tags         []string
	ValidLayouts = []string{"horizontal", "vertical", "grid"}
)

Functions

func ActionGroups

func ActionGroups() []*cobra.Group

ActionGroups returns the action groups.

func AddShowFlags added in v0.0.36

func AddShowFlags(cmd *cobra.Command, defaultLayout string)

AddShowFlags adds shared flags for the show command with a configurable default layout.

func AddTagFlag added in v0.0.32

func AddTagFlag(cmd *cobra.Command)

AddTagFlag adds the --tag flag to the command for filtering resources by tags.

func CreateService added in v0.0.38

func CreateService[T any](cmd *cobra.Command, createService ServiceCreator[T]) (T, error)

func DefaultErrorHandler

func DefaultErrorHandler(err error) error

DefaultErrorHandler handles AWS smithy.OperationError, context timeouts, and can be extended for other error types.

func GetLayout added in v0.0.36

func GetLayout(cmd *cobra.Command) string

GetLayout returns the layout value from the command flags.

func GetPersistentFlags

func GetPersistentFlags(cmd *cobra.Command) (string, string)

GetPersistentFlags returns the profile and region from the command line flags.

func SubcommandGroups

func SubcommandGroups() []*cobra.Group

SubcommandGroups returns the subcommand groups.

func ValidateFlagChoice added in v0.0.36

func ValidateFlagChoice(cmd *cobra.Command, flag string, choices []string) error

ValidateFlagChoice validates that the value of a flag is one of the choices.

Types

type ServiceCreator added in v0.0.38

type ServiceCreator[T any] func(ctx context.Context, profile string, region string) (T, error)

Jump to

Keyboard shortcuts

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