-
Notifications
You must be signed in to change notification settings - Fork 10
/
account.go
41 lines (38 loc) · 1.48 KB
/
account.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
package account
import (
"github.com/MakeNowJust/heredoc/v2"
cmdAWS "github.com/OctopusDeploy/cli/pkg/cmd/account/aws"
cmdAzure "github.com/OctopusDeploy/cli/pkg/cmd/account/azure"
cmdCreate "github.com/OctopusDeploy/cli/pkg/cmd/account/create"
cmdDelete "github.com/OctopusDeploy/cli/pkg/cmd/account/delete"
cmdGCP "github.com/OctopusDeploy/cli/pkg/cmd/account/gcp"
cmdList "github.com/OctopusDeploy/cli/pkg/cmd/account/list"
cmdSSH "github.com/OctopusDeploy/cli/pkg/cmd/account/ssh"
cmdToken "github.com/OctopusDeploy/cli/pkg/cmd/account/token"
cmdUsr "github.com/OctopusDeploy/cli/pkg/cmd/account/username"
"github.com/OctopusDeploy/cli/pkg/constants"
"github.com/OctopusDeploy/cli/pkg/constants/annotations"
"github.com/OctopusDeploy/cli/pkg/factory"
"github.com/spf13/cobra"
)
func NewCmdAccount(f factory.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "account <command>",
Short: "Manage accounts",
Long: "Manage accounts in Octopus Deploy",
Example: heredoc.Docf("$ %s account list", constants.ExecutableName),
Annotations: map[string]string{
annotations.IsInfrastructure: "true",
},
}
cmd.AddCommand(cmdDelete.NewCmdDelete(f))
cmd.AddCommand(cmdCreate.NewCmdCreate(f))
cmd.AddCommand(cmdList.NewCmdList(f))
cmd.AddCommand(cmdAWS.NewCmdAws(f))
cmd.AddCommand(cmdAzure.NewCmdAzure(f))
cmd.AddCommand(cmdGCP.NewCmdGcp(f))
cmd.AddCommand(cmdSSH.NewCmdSsh(f))
cmd.AddCommand(cmdUsr.NewCmdUsername(f))
cmd.AddCommand(cmdToken.NewCmdToken(f))
return cmd
}