-
Notifications
You must be signed in to change notification settings - Fork 72
/
role.go
27 lines (23 loc) · 842 Bytes
/
role.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
package role
import (
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/role/add"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/role/list"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/role/revoke"
"github.com/redhat-developer/app-services-cli/pkg/shared/factory"
"github.com/spf13/cobra"
)
func NewRoleCommand(f *factory.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "role",
Short: f.Localizer.MustLocalize("registry.role.cmd.description.short"),
Long: f.Localizer.MustLocalize("registry.role.cmd.description.long"),
Example: f.Localizer.MustLocalize("registry.role.cmd.example"),
Args: cobra.MinimumNArgs(1),
}
cmd.AddCommand(
add.NewAddCommand(f),
revoke.NewRevokeCommand(f),
list.NewListCommand(f),
)
return cmd
}