flags

package
v0.6.10 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 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 APITokenClientFlags = buildAPITokenClientFlags()
View Source
var APITokenClientHelpText = `` /* 138-byte string literal not displayed */
View Source
var MainClientHelpText = `
   Environment variables example:
	
   GCLOUD_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 PlatformClientFlags = buildPlatformClientFlags()
View Source
var PlatformClientHelpText = `` /* 177-byte string literal not displayed */
View Source
var TokenClientFlags = buildTokenClientFlags()
View Source
var TokenClientHelpText = `` /* 166-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