2019-02-11 19:19:08 +00:00
|
|
|
package command
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"github.com/mitchellh/cli"
|
|
|
|
"github.com/posener/complete"
|
|
|
|
)
|
|
|
|
|
2021-04-08 16:43:39 +00:00
|
|
|
var (
|
|
|
|
_ cli.Command = (*PrintCommand)(nil)
|
|
|
|
_ cli.CommandAutocomplete = (*PrintCommand)(nil)
|
|
|
|
)
|
2019-02-11 19:19:08 +00:00
|
|
|
|
|
|
|
type PrintCommand struct {
|
|
|
|
*BaseCommand
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *PrintCommand) Synopsis() string {
|
|
|
|
return "Prints runtime configurations"
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *PrintCommand) Help() string {
|
|
|
|
helpText := `
|
|
|
|
Usage: vault print <subcommand>
|
|
|
|
|
|
|
|
This command groups subcommands for interacting with Vault's runtime values.
|
|
|
|
|
|
|
|
Subcommands:
|
|
|
|
token Token currently in use
|
|
|
|
`
|
|
|
|
return strings.TrimSpace(helpText)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *PrintCommand) AutocompleteArgs() complete.Predictor {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *PrintCommand) AutocompleteFlags() complete.Flags {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *PrintCommand) Run(args []string) int {
|
|
|
|
return cli.RunResultHelp
|
|
|
|
}
|