flags

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MPL-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

Variables

View Source
var APITokenClientFlags = buildAPITokenClientFlags()
View Source
var APITokenClientHelpText = `` /* 138-byte string literal not displayed */
View Source
var ClientRequestFlags = buildClientRequestFlags()
View Source
var MainClientHelpText = `
   Environment variables example:
	
   GCLOUD_CLIENT_TYPE=[platform,token,api-token]
`
View Source
var OffsetLimitFlags = []cli.Flag{
	&cli.IntFlag{
		Name:     "offset",
		Usage:    "offset of the first item to return from the list",
		Value:    0,
		Required: false,
	},
	&cli.IntFlag{
		Name:     "limit",
		Usage:    "maximum number of items to return from the list",
		Value:    10,
		Required: false,
	},
}
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)

func GetNthStringArg added in v0.11.0

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

GetNthStringArg returns the nth string argument, or an error if the arg is blank

Types

This section is empty.

Jump to

Keyboard shortcuts

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