github.imxd.top/hashicorp/consul@v1.4.5/command/tls/cert/tls_cert.go (about)

     1  package cert
     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 = `Helpers for certificates`
    27  const help = `
    28  Usage: consul tls cert <subcommand> [options] [filename-prefix]
    29  
    30    This command has subcommands for interacting with certificates
    31  
    32    Here are some simple examples, and more detailed examples are available
    33    in the subcommands or the documentation.
    34  
    35    Create a certificate
    36  
    37      $ consul tls cert create -server
    38      ==> saved consul-server-dc1.pem
    39      ==> saved consul-server-dc1-key.pem
    40  
    41    Create a certificate with your own CA:
    42  
    43      $ consul tls cert create -server -ca-file my-ca.pem -ca-key-file my-ca-key.pem
    44      ==> saved consul-server-dc1.pem
    45      ==> saved consul-server-dc1-key.pem
    46  
    47    For more examples, ask for subcommand help or view the documentation.
    48  `