-
Notifications
You must be signed in to change notification settings - Fork 72
/
artifacts.go
47 lines (42 loc) · 1.73 KB
/
artifacts.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
package artifact
import (
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/crud/create"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/crud/delete"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/crud/get"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/crud/list"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/crud/update"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/download"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/metadata"
migrate "github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/migrate"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/state"
"github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/versions"
"github.com/redhat-developer/app-services-cli/pkg/shared/factory"
"github.com/spf13/cobra"
)
func NewArtifactsCommand(f *factory.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "artifact",
Short: f.Localizer.MustLocalize("artifact.cmd.description.short"),
Long: f.Localizer.MustLocalize("artifact.cmd.description.long"),
Example: f.Localizer.MustLocalize("artifact.cmd.example"),
Args: cobra.MinimumNArgs(1),
}
// add sub-commands
cmd.AddCommand(
// CRUD
create.NewCreateCommand(f),
get.NewGetCommand(f),
delete.NewDeleteCommand(f),
list.NewListCommand(f),
update.NewUpdateCommand(f),
// Misc
metadata.NewGetMetadataCommand(f),
metadata.NewSetMetadataCommand(f),
versions.NewVersionsCommand(f),
download.NewDownloadCommand(f),
migrate.NewExportCommand(f),
migrate.NewImportCommand(f),
state.NewSetStateCommand(f),
)
return cmd
}