-
Notifications
You must be signed in to change notification settings - Fork 72
/
connector.go
42 lines (37 loc) · 1.53 KB
/
connector.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
package connector
import (
"github.com/redhat-developer/app-services-cli/internal/doc"
"github.com/redhat-developer/app-services-cli/pkg/cmd/connector/cluster"
"github.com/redhat-developer/app-services-cli/pkg/cmd/connector/create"
"github.com/redhat-developer/app-services-cli/pkg/cmd/connector/delete"
"github.com/redhat-developer/app-services-cli/pkg/cmd/connector/describe"
"github.com/redhat-developer/app-services-cli/pkg/cmd/connector/list"
"github.com/redhat-developer/app-services-cli/pkg/cmd/connector/namespace"
"github.com/redhat-developer/app-services-cli/pkg/cmd/connector/update"
"github.com/redhat-developer/app-services-cli/pkg/shared/factory"
"github.com/spf13/cobra"
)
// NewConnectorCommand creates a new command to manage connectors
func NewConnectorsCommand(f *factory.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "connector",
Hidden: false,
Annotations: map[string]string{doc.AnnotationName: "Connectors commands"},
Short: f.Localizer.MustLocalize("connector.cmd.shortDescription"),
Long: f.Localizer.MustLocalize("connector.cmd.longDescription"),
Example: f.Localizer.MustLocalize("connector.cmd.example"),
Args: cobra.MinimumNArgs(1),
}
// add sub-commands
cmd.AddCommand(
cluster.NewConnectorClusterCommand(f),
namespace.NewNameSpaceCommand(f),
// Hidden for the users and docs at the moment
create.NewCreateCommand(f),
delete.NewDeleteCommand(f),
list.NewListCommand(f),
describe.NewDescribeCommand(f),
update.NewUpdateCommand(f),
)
return cmd
}