mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-06 14:47:01 +02:00
@mitchellh suggested we fork `cli` and switch to that. Since we primarily use the interfaces in `cli`, and the new fork has not changed those, this is (mostly) a drop-in replacement. A small fix will be necessary for Vault Enterprise, I believe.
43 lines
918 B
Go
43 lines
918 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package command
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/hashicorp/cli"
|
|
)
|
|
|
|
var _ cli.Command = (*PKICommand)(nil)
|
|
|
|
type PKICommand struct {
|
|
*BaseCommand
|
|
}
|
|
|
|
func (c *PKICommand) Synopsis() string {
|
|
return "Interact with Vault's PKI Secrets Engine"
|
|
}
|
|
|
|
func (c *PKICommand) Help() string {
|
|
helpText := `
|
|
Usage: vault pki <subcommand> [options] [args]
|
|
|
|
This command has subcommands for interacting with Vault's PKI Secrets
|
|
Engine. Here are some simple examples, and more detailed examples are
|
|
available in the subcommands or the documentation.
|
|
|
|
Check the health of a PKI mount, to the best of this token's abilities:
|
|
|
|
$ vault pki health-check pki
|
|
|
|
Please see the individual subcommand help for detailed usage information.
|
|
`
|
|
|
|
return strings.TrimSpace(helpText)
|
|
}
|
|
|
|
func (c *PKICommand) Run(args []string) int {
|
|
return cli.RunResultHelp
|
|
}
|