github.com/sl1pm4t/consul@v1.4.5-0.20190325224627-74c31c540f9c/command/acl/token/token.go (about) 1 package token 2 3 import ( 4 "github.com/hashicorp/consul/command/flags" 5 "github.com/mitchellh/cli" 6 ) 7 8 func New() *cmd { 9 return &cmd{} 10 } 11 12 type cmd struct{} 13 14 func (c *cmd) Run(args []string) int { 15 return cli.RunResultHelp 16 } 17 18 func (c *cmd) Synopsis() string { 19 return synopsis 20 } 21 22 func (c *cmd) Help() string { 23 return flags.Usage(help, nil) 24 } 25 26 const synopsis = "Manage Consul's ACL Tokens" 27 const help = ` 28 Usage: consul acl token <subcommand> [options] [args] 29 30 This command has subcommands for managing Consul ACL tokens. 31 Here are some simple examples, and more detailed examples are available 32 in the subcommands or the documentation. 33 34 Create a new ACL Token: 35 36 $ consul acl token create \ 37 -description "This is an example token" \ 38 -policy-id 06acc965 39 List all tokens: 40 41 $ consul acl token list 42 43 Update a token: 44 45 $ consul acl token update -id 986193 -description "WonderToken" 46 47 Read a token with an accessor ID: 48 49 $ consul acl token read -id 986193 50 51 Delete a token 52 53 $ consul acl token delete -id 986193 54 55 For more examples, ask for subcommand help or view the documentation. 56 `