github.com/djenriquez/nomad-1@v0.8.1/command/acl_token.go (about) 1 package command 2 3 import ( 4 "strings" 5 6 "github.com/mitchellh/cli" 7 ) 8 9 type ACLTokenCommand struct { 10 Meta 11 } 12 13 func (f *ACLTokenCommand) Help() string { 14 helpText := ` 15 Usage: nomad acl token <subcommand> [options] [args] 16 17 This command groups subcommands for interacting with ACL tokens. Nomad's ACL 18 system can be used to control access to data and APIs. ACL tokens are 19 associated with one or more ACL policies which grant specific capabilities. 20 For a full guide see: https://www.nomadproject.io/guides/acl.html 21 22 Create an ACL token: 23 24 $ nomad acl token create -name "my-token" -policy foo -policy bar 25 26 Lookup a token and display its associated policies: 27 28 $ nomad acl policy info <token_accessor_id> 29 30 Revoke an ACL token: 31 32 $ nomad acl policy delete <token_accessor_id> 33 34 Please see the individual subcommand help for detailed usage information. 35 ` 36 return strings.TrimSpace(helpText) 37 } 38 39 func (f *ACLTokenCommand) Synopsis() string { 40 return "Interact with ACL tokens" 41 } 42 43 func (f *ACLTokenCommand) Run(args []string) int { 44 return cli.RunResultHelp 45 }