-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: clean up main and reorg the commands
Signed-off-by: Derek Smith <[email protected]>
- Loading branch information
Showing
1 changed file
with
21 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,38 +30,15 @@ func main() { | |
Version: version, | ||
Compiled: time.Now(), | ||
Authors: []*cli.Author{ | ||
{ | ||
Name: "Derek Smith", | ||
Email: "[email protected]", | ||
}, | ||
{ | ||
Name: info.AppRepoOwner, | ||
}, | ||
}, | ||
Copyright: "(c) 2021 Derek Smith", | ||
HelpName: info.AppName, | ||
Usage: "interact with config map and secret manager variables", | ||
Usage: "AWS Secrets Manager CLI Tool", | ||
EnableBashCompletion: true, | ||
Commands: []*cli.Command{ | ||
{ | ||
// list-secrets | ||
Name: "list", | ||
Usage: "display table of all secrets with meta data", | ||
Action: cmd.ListSecrets, | ||
}, | ||
{ | ||
// describe-secret | ||
Name: "describe", | ||
Usage: "print description of secret to `STDOUT`", | ||
Flags: []cli.Flag{ | ||
&cli.StringFlag{ | ||
Name: "secret-id", | ||
Aliases: []string{"s"}, | ||
Usage: "Specific Secret to describe, will bypass select/search", | ||
}, | ||
}, | ||
Action: cmd.DescribeSecret, | ||
}, | ||
{ | ||
// get-secret-value | ||
Name: "get", | ||
|
@@ -203,11 +180,31 @@ with AWSPREVIOUS. | |
}, | ||
Action: cmd.DeleteSecret, | ||
}, | ||
{ | ||
// list-secrets | ||
Name: "list", | ||
Usage: "display table of all secrets with meta data", | ||
Action: cmd.ListSecrets, | ||
}, | ||
{ | ||
// describe-secret | ||
Name: "describe", | ||
Usage: "print description of secret to `STDOUT`", | ||
Flags: []cli.Flag{ | ||
&cli.StringFlag{ | ||
Name: "secret-id", | ||
Aliases: []string{"s"}, | ||
Usage: "Specific Secret to describe, will bypass select/search", | ||
}, | ||
}, | ||
Action: cmd.DescribeSecret, | ||
}, | ||
im, | ||
{ | ||
Name: "version", | ||
Aliases: []string{"v"}, | ||
Usage: "Print version info", | ||
Hidden: true, | ||
Action: func(c *cli.Context) error { | ||
fmt.Printf("%s %s (%s/%s)\n", info.AppName, version, runtime.GOOS, runtime.GOARCH) | ||
return nil | ||
|