-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathscrape_config.go
36 lines (32 loc) · 1.3 KB
/
scrape_config.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
package scrapeconfig
import (
"github.com/stackitcloud/stackit-cli/internal/cmd/argus/scrape-config/create"
"github.com/stackitcloud/stackit-cli/internal/cmd/argus/scrape-config/delete"
"github.com/stackitcloud/stackit-cli/internal/cmd/argus/scrape-config/describe"
generatepayload "github.com/stackitcloud/stackit-cli/internal/cmd/argus/scrape-config/generate-payload"
"github.com/stackitcloud/stackit-cli/internal/cmd/argus/scrape-config/list"
"github.com/stackitcloud/stackit-cli/internal/cmd/argus/scrape-config/update"
"github.com/stackitcloud/stackit-cli/internal/pkg/args"
"github.com/stackitcloud/stackit-cli/internal/pkg/print"
"github.com/stackitcloud/stackit-cli/internal/pkg/utils"
"github.com/spf13/cobra"
)
func NewCmd(p *print.Printer) *cobra.Command {
cmd := &cobra.Command{
Use: "scrape-config",
Short: "Provides functionality for scrape configurations in Argus",
Long: "Provides functionality for scrape configurations in Argus.",
Args: args.NoArgs,
Run: utils.CmdHelp,
}
addSubcommands(cmd, p)
return cmd
}
func addSubcommands(cmd *cobra.Command, p *print.Printer) {
cmd.AddCommand(generatepayload.NewCmd(p))
cmd.AddCommand(create.NewCmd(p))
cmd.AddCommand(delete.NewCmd(p))
cmd.AddCommand(update.NewCmd(p))
cmd.AddCommand(list.NewCmd(p))
cmd.AddCommand(describe.NewCmd(p))
}