-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PKI Synopsis, add Transit help text and casing fixes (#19395)
* Fix synopsis for PKI subcommand Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Add transit command for synopsis, help text Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> * Fix nits around spacing Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com> --------- Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
- Loading branch information
Showing
5 changed files
with
50 additions
and
4 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
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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package command | ||
|
||
import ( | ||
"strings" | ||
|
||
"github.com/mitchellh/cli" | ||
) | ||
|
||
var _ cli.Command = (*TransitCommand)(nil) | ||
|
||
type TransitCommand struct { | ||
*BaseCommand | ||
} | ||
|
||
func (c *TransitCommand) Synopsis() string { | ||
return "Interact with Vault's Transit Secrets Engine" | ||
} | ||
|
||
func (c *TransitCommand) Help() string { | ||
helpText := ` | ||
Usage: vault transit <subcommand> [options] [args] | ||
This command has subcommands for interacting with Vault's Transit Secrets | ||
Engine. Here are some simple examples, and more detailed examples are | ||
available in the subcommands or the documentation. | ||
To import a key into the specified Transit or Transform mount: | ||
$ vault transit import transit/keys/newly-imported @path/to/key type=rsa-2048 | ||
Please see the individual subcommand help for detailed usage information. | ||
` | ||
|
||
return strings.TrimSpace(helpText) | ||
} | ||
|
||
func (c *TransitCommand) Run(args []string) int { | ||
return cli.RunResultHelp | ||
} |
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
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