Documentation ¶
Index ¶
- Constants
- Variables
- func AddComputeInstanceFlag(fs *pflag.FlagSet, instance *string, required bool)
- func AddPersistentFlags(fs *pflag.FlagSet)
- func AddProjectFlag(fs *pflag.FlagSet, project *string)
- func AddPubSubTopicFlag(fs *pflag.FlagSet, topic *string, required bool)
- func AddReasonFlag(fs *pflag.FlagSet, reason *string, required bool)
- func AddRegionFlag(fs *pflag.FlagSet, region *string, required bool)
- func AddServiceAccountEmailFlag(fs *pflag.FlagSet, serviceAccountEmail *string, required bool)
- func AddStorageBucketFlag(fs *pflag.FlagSet, bucket *string, required bool)
- func AddZoneFlag(fs *pflag.FlagSet, zone *string, required bool)
- func CheckRequired(flag *pflag.Flag)
- type CmdConfig
Constants ¶
const (
RequiredAnnotation = "eiam_required_flag"
)
Flag annotation strings
Variables ¶
var ( ProjectFlag = flagName{"project", "p"} ReasonFlag = flagName{"reason", "R"} RegionFlag = flagName{"region", "r"} ServiceAccountEmailFlag = flagName{"service-account-email", "s"} YesFlag = flagName{"yes", "y"} ZoneFlag = flagName{"zone", "z"} )
Flag names and shorthands
var ( ComputeInstanceFlag = flagName{"instance", "i"} PubSubTopicFlag = flagName{"topic", "t"} StorageBucketFlag = flagName{"bucket", "b"} )
Flag names and shorthands
var YesOption = false
YesOption designates whether to prompt for confirmation or not
Functions ¶
func AddComputeInstanceFlag ¶
AddComputeInstanceFlag adds the --instance/-i flag to the command
func AddPersistentFlags ¶
AddPersistentFlags add persistent flags to the root command
func AddProjectFlag ¶
AddProjectFlag adds the --project/-p flag to the command
func AddPubSubTopicFlag ¶
AddPubSubTopicFlag adds the --topic/-t flag to the command
func AddReasonFlag ¶
AddReasonFlag adds the --reason/-R flag
func AddRegionFlag ¶
AddRegionFlag adds the --region/-r flag to the command
func AddServiceAccountEmailFlag ¶
AddServiceAccountEmailFlag adds the --service-account-email/-s flag
func AddStorageBucketFlag ¶
AddStorageBucketFlag adds the --bucket/-b flag to the command
func AddZoneFlag ¶
AddZoneFlag adds the --zone/-z flag to the command
func CheckRequired ¶
CheckRequired ensures that a command's required flags have been set