-
Notifications
You must be signed in to change notification settings - Fork 71
/
main.go
64 lines (61 loc) · 1.33 KB
/
main.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package main
import (
"github.com/cloudtools/ssh-cert-authority/version"
"github.com/codegangsta/cli"
"os"
)
func main() {
app := cli.NewApp()
app.Name = "ssh-cert-authority"
app.EnableBashCompletion = true
app.Version = version.BuildVersion
app.Commands = []cli.Command{
{
Name: "request",
Aliases: []string{"r"},
Flags: requestCertFlags(),
Usage: "Request a new certificate",
Action: requestCert,
},
{
Name: "sign",
Aliases: []string{"s"},
Flags: signCertFlags(),
Usage: "Sign a certificate",
Action: signCert,
},
{
Name: "get",
Aliases: []string{"g"},
Flags: getCertFlags(),
Usage: "Get a certificate",
Action: getCert,
},
{
Name: "list",
Aliases: []string{"l"},
Flags: listCertFlags(),
Usage: "List pending requests on the server",
Action: listCerts,
},
{
Name: "runserver",
Flags: signdFlags(),
Usage: "Run the cert-authority web service",
Action: signCertd,
},
{
Name: "encrypt-key",
Flags: encryptFlags(),
Usage: "Optionally generate and then encrypt an ssh private key",
Action: cmdEncryptKey,
},
{
Name: "generate-config",
Flags: generateConfigFlags(),
Usage: "Try to generate a configuration file for a requester",
Action: cmdGenerateConfig,
},
}
app.Run(os.Args)
}