vault/command/secrets.go
Christopher Swenson 6ed8b88f5f
Switch from mitchellh/cli to hashicorp/cli (#24239)
@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.
2023-12-04 11:05:02 -08:00

47 lines
934 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package command
import (
"strings"
"github.com/hashicorp/cli"
)
var _ cli.Command = (*SecretsCommand)(nil)
type SecretsCommand struct {
*BaseCommand
}
func (c *SecretsCommand) Synopsis() string {
return "Interact with secrets engines"
}
func (c *SecretsCommand) Help() string {
helpText := `
Usage: vault secrets <subcommand> [options] [args]
This command groups subcommands for interacting with Vault's secrets engines.
Each secret engine behaves differently. Please see the documentation for
more information.
List all enabled secrets engines:
$ vault secrets list
Enable a new secrets engine:
$ vault secrets enable database
Please see the individual subcommand help for detailed usage information.
`
return strings.TrimSpace(helpText)
}
func (c *SecretsCommand) Run(args []string) int {
return cli.RunResultHelp
}