github.com/hernad/nomad@v1.6.112/command/tls_cert.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package command
     5  
     6  import (
     7  	"strings"
     8  
     9  	"github.com/mitchellh/cli"
    10  	"github.com/posener/complete"
    11  )
    12  
    13  type TLSCertCommand struct {
    14  	Meta
    15  }
    16  
    17  func (c *TLSCertCommand) Help() string {
    18  	helpText := `
    19  Usage: nomad tls cert <subcommand> [options]
    20  
    21    This command groups subcommands for interacting with certificates.
    22    For examples, see the documentation.
    23  
    24    Create a TLS certificate.
    25  
    26        $ nomad tls cert create
    27  
    28    Show information about a TLS certificate.
    29  
    30        $ nomad tls cert info
    31  `
    32  	return strings.TrimSpace(helpText)
    33  }
    34  
    35  func (c *TLSCertCommand) AutocompleteArgs() complete.Predictor {
    36  	return complete.PredictNothing
    37  }
    38  
    39  func (c *TLSCertCommand) Synopsis() string {
    40  	return "Helpers for managing certificates"
    41  }
    42  
    43  func (c *TLSCertCommand) Name() string { return "tls cert" }
    44  
    45  func (c *TLSCertCommand) Run(_ []string) int {
    46  	return cli.RunResultHelp
    47  }