Documentation ¶
Index ¶
- Variables
- func NewAddCommand() *cobra.Command
- func NewDeleteCommand() *cobra.Command
- func NewDeployCommand() *cobra.Command
- func NewInitCommand() *cobra.Command
- func NewRefreshCommand() *cobra.Command
- func NewRootCommand(out, stderr io.Writer) *cobra.Command
- func NewServerCommand() *cobra.Command
- func NewStatusCommand() *cobra.Command
- func NewUpdateCommand() *cobra.Command
- func NewVersionCommand() *cobra.Command
- func SetCommandFlags(cmd *cobra.Command)
- type Command
- type Flag
Constants ¶
This section is empty.
Variables ¶
View Source
var CommonFlagRegistry = []Flag{ { Name: "profile", Shorthand: "p", Usage: "Profile configuration of AWS", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, }
View Source
var FlagRegistry = map[string][]Flag{ "fullSet": { { Name: "manifest", Shorthand: "m", Usage: "The manifest configuration file to use. (required)", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "manifest-s3-region", Usage: "Region of bucket containing the manifest configuration file to use. (required if –manifest starts with s3://)", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "stack", Usage: "stack that should be deployed.(required)", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "ami", Usage: "Amazon AMI to use.", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "env", Usage: "The environment that is being deployed into.", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "assume-role", Usage: "The Role ARN to assume into.", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "timeout", Usage: "Time to wait for deploy to finish before timing out (default 60m)", Value: &zeroTimeout, DefValue: timeout, FlagAddMethod: "DurationVar", }, { Name: "region", Usage: "The region to deploy into, if undefined, then the deployment will run against all regions for the given environment.", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "slack-off", Usage: "Turn off slack alarm", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, { Name: "log-level", Usage: "Level of logging", Shorthand: "v", Value: aws.String(constants.EmptyString), DefValue: "warning", FlagAddMethod: "StringVar", }, { Name: "extra-tags", Usage: "Extra tags to add to autoscaling group tags", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "ansible-extra-vars", Usage: "Extra variables for ansible", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "override-instance-type", Usage: "Instance Type to override", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "override-spot-types", Usage: "Spot Instance Type to override", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "disable-metrics", Usage: "Disable gathering metrics.", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, { Name: "release-notes", Usage: "Release note for the current deployment", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "release-notes-base64", Usage: "Base64 encoded string of release note for the current deployment", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "force-manifest-capacity", Usage: "Force-apply the capacity of instances in the manifest file", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, { Name: "polling-interval", Usage: "Time to interval for polling health check (default 60s)", Value: &zeroPollingInterval, DefValue: pollingInterval, FlagAddMethod: "DurationVar", }, { Name: "auto-apply", Usage: "Apply command without confirmation from local terminal", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, }, "deploySet": { { Name: "manifest", Shorthand: "m", Usage: "The manifest configuration file to use. (required)", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "manifest-s3-region", Usage: "Region of bucket containing the manifest configuration file to use. (required if –manifest starts with s3://)", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "stack", Usage: "stack that should be deployed.(required)", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "ami", Usage: "Amazon AMI to use.", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "env", Usage: "The environment that is being deployed into.", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "assume-role", Usage: "The Role ARN to assume into.", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "timeout", Usage: "Time to wait for deploy to finish before timing out (default 60m)", Value: &zeroTimeout, DefValue: timeout, FlagAddMethod: "DurationVar", }, { Name: "region", Usage: "The region to deploy into, if undefined, then the deployment will run against all regions for the given environment.", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "slack-off", Usage: "Turn off slack alarm", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, { Name: "log-level", Usage: "Level of logging", Shorthand: "v", Value: aws.String(constants.EmptyString), DefValue: "warning", FlagAddMethod: "StringVar", }, { Name: "extra-tags", Usage: "Extra tags to add to autoscaling group tags", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "ansible-extra-vars", Usage: "Extra variables for ansible", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "override-instance-type", Usage: "Instance Type to override", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "override-spot-types", Usage: "Spot Instance Type to override", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "disable-metrics", Usage: "Disable gathering metrics.", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, { Name: "release-notes", Usage: "Release note for the current deployment", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "release-notes-base64", Usage: "Base64 encoded string of release note for the current deployment", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "force-manifest-capacity", Usage: "Force-apply the capacity of instances in the manifest file", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, { Name: "polling-interval", Usage: "Time to interval for polling health check (default 60s)", Value: &zeroPollingInterval, DefValue: pollingInterval, FlagAddMethod: "DurationVar", }, { Name: "auto-apply", Usage: "Apply command without confirmation from local terminal", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, { Name: "complete-canary", Usage: "Complete the rest of canary deployment.(Only works with Canary replacement type)", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, }, "initSet": { { Name: "log-level", Usage: "Level of logging", Shorthand: "v", Value: aws.String(constants.EmptyString), DefValue: "warning", FlagAddMethod: "StringVar", }, }, "addSet": { { Name: "log-level", Usage: "Level of logging", Shorthand: "v", Value: aws.String(constants.EmptyString), DefValue: "warning", FlagAddMethod: "StringVar", }, }, "statusSet": { { Name: "region", Usage: "Region of autoscaling group", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, }, "updateSet": { { Name: "region", Usage: "Region of autoscaling group", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "auto-apply", Usage: "Apply command without confirmation from local terminal", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, { Name: "min", Usage: "Minimum instance capacity you want to update with", Value: aws.Int(-1), DefValue: -1, FlagAddMethod: "IntVar", }, { Name: "max", Usage: "Maximum instance capacity you want to update with", Value: aws.Int(-1), DefValue: -1, FlagAddMethod: "IntVar", }, { Name: "desired", Usage: "Desired instance capacity you want to update with", Value: aws.Int(-1), DefValue: -1, FlagAddMethod: "IntVar", }, { Name: "polling-interval", Usage: "Time to interval for polling health check (default 60s)", Value: &zeroPollingInterval, DefValue: pollingInterval, FlagAddMethod: "DurationVar", }, { Name: "timeout", Usage: "Time to wait for deploy to finish before timing out (default 60m)", Value: &zeroTimeout, DefValue: timeout, FlagAddMethod: "DurationVar", }, }, "refreshSet": { { Name: "region", Usage: "Region of autoscaling group", Value: aws.String(constants.EmptyString), DefValue: constants.EmptyString, FlagAddMethod: "StringVar", }, { Name: "auto-apply", Usage: "Apply command without confirmation from local terminal", Value: aws.Bool(false), DefValue: false, FlagAddMethod: "BoolVar", }, { Name: "instance-warmup", Usage: "How much time it takes a newly launched instance to be ready to use.", Value: aws.Int(constants.DefaultInstanceWarmup), DefValue: constants.DefaultInstanceWarmup, FlagAddMethod: "IntVar", }, { Name: "min-healthy-percentage", Usage: "At least this percentage of the desired capacity of the Auto Scaling group must remain healthy during this operation to allow it to continue.", Value: aws.Int(constants.DefaultMinHealthyPercentage), DefValue: constants.DefaultMinHealthyPercentage, FlagAddMethod: "IntVar", }, { Name: "polling-interval", Usage: "Time to interval for polling health check (default 60s)", Value: &zeroPollingInterval, DefValue: pollingInterval, FlagAddMethod: "DurationVar", }, { Name: "timeout", Usage: "Time to wait for deploy to finish before timing out (default 60m)", Value: &zeroTimeout, DefValue: timeout, FlagAddMethod: "DurationVar", }, }, }
Functions ¶
func NewRootCommand ¶
NewRootCommand creates new root command
Types ¶
type Command ¶
type Command interface { WithDescription(description string) Command WithLongDescription(description string) Command SetFlags() Command SetPreRunWithArgs(action func(context.Context, io.Writer, []string) error) Command RunWithNoArgs(action func(context.Context, io.Writer, string) error) *cobra.Command RunWithArgs(action func(context.Context, io.Writer, []string, string) error) *cobra.Command }
Click to show internal directories.
Click to hide internal directories.