Documentation
¶
Index ¶
- Constants
- Variables
- func AddFlags(commands []*cli.Command, flags ...cli.Flag)
- func AddOutputFlags(commands []*cli.Command)
- func GetFirstIntArg(c *cli.Context, errorText string) (int, error)
- func GetFirstStringArg(c *cli.Context, errorText string) (string, error)
- func GetNthStringArg(c *cli.Context, errorText string, n int) (string, error)
Constants ¶
View Source
const ( ClientTypeToken = "token" ClientTypePlatform = "platform" ClientTypeAPIToken = "api-token" )
Variables ¶
View Source
var ( ClientType string ClientTypes = []string{ClientTypeToken, ClientTypePlatform, ClientTypeAPIToken} )
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 AddOutputFlags ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.