flags

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientTypeToken    = "token"
	ClientTypePlatform = "platform"
	ClientTypeAPIToken = "api-token"
)

Variables

View Source
var (
	ClientType  string
	ClientTypes = []string{ClientTypeToken, ClientTypePlatform}
)
View Source
var (
	TokenClientFlags    = buildTokenClientFlags()
	PlatformClientFlags = buildPlatformClientFlags()
	APITokenClientFlags = buildAPITokenClientFlags()
)
View Source
var APITokenClientHelpText = `` /* 148-byte string literal not displayed */
View Source
var MainClientHelpText = `
   Environment variables example:
	
   EC_CLOUD_CLIENT_TYPE=[platform,token,api-token]
`
View Source
var OutputFlags = []cli.Flag{
	&cli.BoolFlag{
		Name:     "debug",
		Aliases:  []string{"d"},
		Usage:    "debug API requests",
		Required: false,
	},
	&cli.GenericFlag{
		Name:    "format",
		Aliases: []string{"f"},
		Value: &utils.EnumValue{
			Enum:    []string{"json", "table", "yaml"},
			Default: "json",
		},
		Usage: "output in json, table or yaml",
	},
}
View Source
var PlatformClientHelpText = `` /* 191-byte string literal not displayed */
View Source
var TokenClientHelpText = `` /* 178-byte string literal not displayed */
View Source
var WaitCommandFlags = []cli.Flag{
	&cli.BoolFlag{
		Name:     "wait",
		Aliases:  []string{"w"},
		Usage:    "Wait while command is being processed ",
		Value:    false,
		Required: false,
	},
	&cli.IntFlag{
		Name:     "wait-seconds",
		Usage:    "Required amount of time in seconds to wait while command is being processed",
		Value:    3600,
		Required: false,
	},
}

Functions

func AddFlags

func AddFlags(commands []*cli.Command, flags ...cli.Flag)

func AddOutputFlags

func AddOutputFlags(commands []*cli.Command)

func GetFirstIntArg

func GetFirstIntArg(c *cli.Context, errorText string) (int, error)

func GetFirstStringArg

func GetFirstStringArg(c *cli.Context, errorText string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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