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