-
Notifications
You must be signed in to change notification settings - Fork 72
/
serviceaccount.go
34 lines (30 loc) · 1.33 KB
/
serviceaccount.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
package serviceaccount
import (
"github.com/redhat-developer/app-services-cli/internal/doc"
"github.com/redhat-developer/app-services-cli/pkg/cmd/serviceaccount/create"
"github.com/redhat-developer/app-services-cli/pkg/cmd/serviceaccount/delete"
"github.com/redhat-developer/app-services-cli/pkg/cmd/serviceaccount/describe"
"github.com/redhat-developer/app-services-cli/pkg/cmd/serviceaccount/list"
"github.com/redhat-developer/app-services-cli/pkg/cmd/serviceaccount/resetcredentials"
"github.com/redhat-developer/app-services-cli/pkg/shared/factory"
"github.com/spf13/cobra"
)
// NewServiceAccountCommand creates a new command sub-group to manage service accounts
func NewServiceAccountCommand(f *factory.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "service-account",
Annotations: map[string]string{doc.AnnotationName: "Service account commands"},
Short: f.Localizer.MustLocalize("serviceAccount.cmd.shortDescription"),
Long: f.Localizer.MustLocalize("serviceAccount.cmd.longDescription"),
Example: f.Localizer.MustLocalize("serviceAccount.cmd.example"),
Args: cobra.ExactArgs(1),
}
cmd.AddCommand(
create.NewCreateCommand(f),
list.NewListCommand(f),
delete.NewDeleteCommand(f),
resetcredentials.NewResetCredentialsCommand(f),
describe.NewDescribeCommand(f),
)
return cmd
}