Files
stack/components/fctl/cmd/cloud/root.go
2024-03-15 15:16:03 +00:00

26 lines
651 B
Go

package cloud
import (
"github.com/formancehq/fctl/cmd/cloud/me"
"github.com/formancehq/fctl/cmd/cloud/organizations"
"github.com/formancehq/fctl/cmd/cloud/regions"
fctl "github.com/formancehq/fctl/pkg"
"github.com/spf13/cobra"
)
func NewCommand() *cobra.Command {
return fctl.NewCommand("cloud",
fctl.WithAliases("c"),
fctl.WithShortDescription("Cloud management"),
fctl.WithChildCommands(
organizations.NewCommand(),
me.NewCommand(),
regions.NewCommand(),
NewGeneratePersonalTokenCommand(),
),
fctl.WithPersistentPreRunE(func(cmd *cobra.Command, args []string) error {
return fctl.NewMembershipStore(cmd)
}),
)
}