1package command 2 3import ( 4 "strings" 5 6 "github.com/mitchellh/cli" 7) 8 9var _ cli.Command = (*TokenCommand)(nil) 10 11type TokenCommand struct { 12 *BaseCommand 13} 14 15func (c *TokenCommand) Synopsis() string { 16 return "Interact with tokens" 17} 18 19func (c *TokenCommand) Help() string { 20 helpText := ` 21Usage: vault token <subcommand> [options] [args] 22 23 This command groups subcommands for interacting with tokens. Users can 24 create, lookup, renew, and revoke tokens. 25 26 Create a new token: 27 28 $ vault token create 29 30 Revoke a token: 31 32 $ vault token revoke 96ddf4bc-d217-f3ba-f9bd-017055595017 33 34 Renew a token: 35 36 $ vault token renew 96ddf4bc-d217-f3ba-f9bd-017055595017 37 38 Please see the individual subcommand help for detailed usage information. 39` 40 41 return strings.TrimSpace(helpText) 42} 43 44func (c *TokenCommand) Run(args []string) int { 45 return cli.RunResultHelp 46} 47