From ea24ae7f1f77e94e9c8bf102d2e0ab5b146cc395 Mon Sep 17 00:00:00 2001 From: rsteube Date: Fri, 29 Jul 2022 12:40:06 +0200 Subject: [PATCH] added fury --- completers/fury_completer/cmd/accounts.go | 17 +++++++++++++ completers/fury_completer/cmd/git.go | 17 +++++++++++++ completers/fury_completer/cmd/git_config.go | 17 +++++++++++++ .../fury_completer/cmd/git_config_get.go | 17 +++++++++++++ .../fury_completer/cmd/git_config_set.go | 17 +++++++++++++ .../fury_completer/cmd/git_config_unset.go | 17 +++++++++++++ completers/fury_completer/cmd/git_destroy.go | 19 +++++++++++++++ completers/fury_completer/cmd/git_list.go | 17 +++++++++++++ completers/fury_completer/cmd/git_rebuild.go | 18 ++++++++++++++ completers/fury_completer/cmd/git_rename.go | 17 +++++++++++++ completers/fury_completer/cmd/help.go | 17 +++++++++++++ completers/fury_completer/cmd/login.go | 17 +++++++++++++ completers/fury_completer/cmd/logout.go | 17 +++++++++++++ completers/fury_completer/cmd/packages.go | 18 ++++++++++++++ completers/fury_completer/cmd/push.go | 19 +++++++++++++++ completers/fury_completer/cmd/root.go | 24 +++++++++++++++++++ completers/fury_completer/cmd/sharing.go | 17 +++++++++++++ completers/fury_completer/cmd/sharing_add.go | 18 ++++++++++++++ .../fury_completer/cmd/sharing_remove.go | 17 +++++++++++++ completers/fury_completer/cmd/versions.go | 17 +++++++++++++ completers/fury_completer/cmd/whoami.go | 17 +++++++++++++ completers/fury_completer/cmd/yank.go | 18 ++++++++++++++ completers/fury_completer/main.go | 7 ++++++ 23 files changed, 396 insertions(+) create mode 100644 completers/fury_completer/cmd/accounts.go create mode 100644 completers/fury_completer/cmd/git.go create mode 100644 completers/fury_completer/cmd/git_config.go create mode 100644 completers/fury_completer/cmd/git_config_get.go create mode 100644 completers/fury_completer/cmd/git_config_set.go create mode 100644 completers/fury_completer/cmd/git_config_unset.go create mode 100644 completers/fury_completer/cmd/git_destroy.go create mode 100644 completers/fury_completer/cmd/git_list.go create mode 100644 completers/fury_completer/cmd/git_rebuild.go create mode 100644 completers/fury_completer/cmd/git_rename.go create mode 100644 completers/fury_completer/cmd/help.go create mode 100644 completers/fury_completer/cmd/login.go create mode 100644 completers/fury_completer/cmd/logout.go create mode 100644 completers/fury_completer/cmd/packages.go create mode 100644 completers/fury_completer/cmd/push.go create mode 100644 completers/fury_completer/cmd/root.go create mode 100644 completers/fury_completer/cmd/sharing.go create mode 100644 completers/fury_completer/cmd/sharing_add.go create mode 100644 completers/fury_completer/cmd/sharing_remove.go create mode 100644 completers/fury_completer/cmd/versions.go create mode 100644 completers/fury_completer/cmd/whoami.go create mode 100644 completers/fury_completer/cmd/yank.go create mode 100644 completers/fury_completer/main.go diff --git a/completers/fury_completer/cmd/accounts.go b/completers/fury_completer/cmd/accounts.go new file mode 100644 index 0000000000..bf8f4c36db --- /dev/null +++ b/completers/fury_completer/cmd/accounts.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var accountsCmd = &cobra.Command{ + Use: "accounts", + Short: "Listing of your collaborations", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(accountsCmd).Standalone() + rootCmd.AddCommand(accountsCmd) +} diff --git a/completers/fury_completer/cmd/git.go b/completers/fury_completer/cmd/git.go new file mode 100644 index 0000000000..ba27e14dbb --- /dev/null +++ b/completers/fury_completer/cmd/git.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var gitCmd = &cobra.Command{ + Use: "git", + Short: "Git repository commands", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(gitCmd).Standalone() + rootCmd.AddCommand(gitCmd) +} diff --git a/completers/fury_completer/cmd/git_config.go b/completers/fury_completer/cmd/git_config.go new file mode 100644 index 0000000000..5f6cd763d9 --- /dev/null +++ b/completers/fury_completer/cmd/git_config.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var git_configCmd = &cobra.Command{ + Use: "config", + Short: "Configure Git build", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(git_configCmd).Standalone() + gitCmd.AddCommand(git_configCmd) +} diff --git a/completers/fury_completer/cmd/git_config_get.go b/completers/fury_completer/cmd/git_config_get.go new file mode 100644 index 0000000000..66e2ae2d0c --- /dev/null +++ b/completers/fury_completer/cmd/git_config_get.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var git_config_getCmd = &cobra.Command{ + Use: "get", + Short: "Get Git build environment key", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(git_config_getCmd).Standalone() + git_configCmd.AddCommand(git_config_getCmd) +} diff --git a/completers/fury_completer/cmd/git_config_set.go b/completers/fury_completer/cmd/git_config_set.go new file mode 100644 index 0000000000..85cabc119a --- /dev/null +++ b/completers/fury_completer/cmd/git_config_set.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var git_config_setCmd = &cobra.Command{ + Use: "set", + Short: "Set Git build environment key", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(git_config_setCmd).Standalone() + git_configCmd.AddCommand(git_config_setCmd) +} diff --git a/completers/fury_completer/cmd/git_config_unset.go b/completers/fury_completer/cmd/git_config_unset.go new file mode 100644 index 0000000000..d8d05746ee --- /dev/null +++ b/completers/fury_completer/cmd/git_config_unset.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var git_config_unsetCmd = &cobra.Command{ + Use: "unset", + Short: "Remove Git build environment key", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(git_config_unsetCmd).Standalone() + git_configCmd.AddCommand(git_config_unsetCmd) +} diff --git a/completers/fury_completer/cmd/git_destroy.go b/completers/fury_completer/cmd/git_destroy.go new file mode 100644 index 0000000000..248e2df6fa --- /dev/null +++ b/completers/fury_completer/cmd/git_destroy.go @@ -0,0 +1,19 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var git_destroyCmd = &cobra.Command{ + Use: "destroy", + Short: "Remove Git repository", + Aliases: []string{"reset"}, + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(git_destroyCmd).Standalone() + git_destroyCmd.Flags().Bool("reset-only", false, "Reset repo without destroying") + gitCmd.AddCommand(git_destroyCmd) +} diff --git a/completers/fury_completer/cmd/git_list.go b/completers/fury_completer/cmd/git_list.go new file mode 100644 index 0000000000..81da2c4df8 --- /dev/null +++ b/completers/fury_completer/cmd/git_list.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var git_listCmd = &cobra.Command{ + Use: "list", + Short: "List repos in this account", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(git_listCmd).Standalone() + gitCmd.AddCommand(git_listCmd) +} diff --git a/completers/fury_completer/cmd/git_rebuild.go b/completers/fury_completer/cmd/git_rebuild.go new file mode 100644 index 0000000000..bdad4faf2a --- /dev/null +++ b/completers/fury_completer/cmd/git_rebuild.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var git_rebuildCmd = &cobra.Command{ + Use: "rebuild", + Short: "Run the builder on the repo", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(git_rebuildCmd).Standalone() + git_rebuildCmd.Flags().StringP("revision", "r", "", "Revision") + gitCmd.AddCommand(git_rebuildCmd) +} diff --git a/completers/fury_completer/cmd/git_rename.go b/completers/fury_completer/cmd/git_rename.go new file mode 100644 index 0000000000..76b61f3e6f --- /dev/null +++ b/completers/fury_completer/cmd/git_rename.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var git_renameCmd = &cobra.Command{ + Use: "rename", + Short: "Rename a Git repository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(git_renameCmd).Standalone() + gitCmd.AddCommand(git_renameCmd) +} diff --git a/completers/fury_completer/cmd/help.go b/completers/fury_completer/cmd/help.go new file mode 100644 index 0000000000..f55758d2d7 --- /dev/null +++ b/completers/fury_completer/cmd/help.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var helpCmd = &cobra.Command{ + Use: "help", + Short: "Help about any command", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(helpCmd).Standalone() + rootCmd.AddCommand(helpCmd) +} diff --git a/completers/fury_completer/cmd/login.go b/completers/fury_completer/cmd/login.go new file mode 100644 index 0000000000..854bc8b740 --- /dev/null +++ b/completers/fury_completer/cmd/login.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var loginCmd = &cobra.Command{ + Use: "login", + Short: "Authenticate into Gemfury account", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(loginCmd).Standalone() + rootCmd.AddCommand(loginCmd) +} diff --git a/completers/fury_completer/cmd/logout.go b/completers/fury_completer/cmd/logout.go new file mode 100644 index 0000000000..9479e34399 --- /dev/null +++ b/completers/fury_completer/cmd/logout.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var logoutCmd = &cobra.Command{ + Use: "logout", + Short: "Clear CLI session credentials", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(logoutCmd).Standalone() + rootCmd.AddCommand(logoutCmd) +} diff --git a/completers/fury_completer/cmd/packages.go b/completers/fury_completer/cmd/packages.go new file mode 100644 index 0000000000..c1a3b42a95 --- /dev/null +++ b/completers/fury_completer/cmd/packages.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var packagesCmd = &cobra.Command{ + Use: "packages", + Short: "List packages in this account", + Aliases: []string{"list"}, + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(packagesCmd).Standalone() + rootCmd.AddCommand(packagesCmd) +} diff --git a/completers/fury_completer/cmd/push.go b/completers/fury_completer/cmd/push.go new file mode 100644 index 0000000000..224f05f093 --- /dev/null +++ b/completers/fury_completer/cmd/push.go @@ -0,0 +1,19 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var pushCmd = &cobra.Command{ + Use: "push", + Short: "Upload a new version of a package", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(pushCmd).Standalone() + pushCmd.Flags().Bool("public", false, "Create as public package") + pushCmd.Flags().Bool("quiet", false, "Do not show progress bar") + rootCmd.AddCommand(pushCmd) +} diff --git a/completers/fury_completer/cmd/root.go b/completers/fury_completer/cmd/root.go new file mode 100644 index 0000000000..bee3466767 --- /dev/null +++ b/completers/fury_completer/cmd/root.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var rootCmd = &cobra.Command{ + Use: "fury", + Short: "Command line interface to Gemfury API", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func Execute() error { + return rootCmd.Execute() +} + +func init() { + carapace.Gen(rootCmd).Standalone() + rootCmd.PersistentFlags().StringP("account", "a", "", "Current account username") + rootCmd.PersistentFlags().String("api-token", "", "Inline authentication token") + rootCmd.Flags().BoolP("help", "h", false, "help for fury") + rootCmd.Flags().BoolP("version", "v", false, "version for fury") +} diff --git a/completers/fury_completer/cmd/sharing.go b/completers/fury_completer/cmd/sharing.go new file mode 100644 index 0000000000..6108339002 --- /dev/null +++ b/completers/fury_completer/cmd/sharing.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var sharingCmd = &cobra.Command{ + Use: "sharing", + Short: "Collaboration commands", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(sharingCmd).Standalone() + rootCmd.AddCommand(sharingCmd) +} diff --git a/completers/fury_completer/cmd/sharing_add.go b/completers/fury_completer/cmd/sharing_add.go new file mode 100644 index 0000000000..4bce37bce3 --- /dev/null +++ b/completers/fury_completer/cmd/sharing_add.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var sharing_addCmd = &cobra.Command{ + Use: "add", + Short: "Add a collaborator", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(sharing_addCmd).Standalone() + sharing_addCmd.Flags().String("role", "", "Collaborator role") + sharingCmd.AddCommand(sharing_addCmd) +} diff --git a/completers/fury_completer/cmd/sharing_remove.go b/completers/fury_completer/cmd/sharing_remove.go new file mode 100644 index 0000000000..abcc8d81e3 --- /dev/null +++ b/completers/fury_completer/cmd/sharing_remove.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var sharing_removeCmd = &cobra.Command{ + Use: "remove", + Short: "Remove a collaborator", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(sharing_removeCmd).Standalone() + sharingCmd.AddCommand(sharing_removeCmd) +} diff --git a/completers/fury_completer/cmd/versions.go b/completers/fury_completer/cmd/versions.go new file mode 100644 index 0000000000..228cfc03f0 --- /dev/null +++ b/completers/fury_completer/cmd/versions.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var versionsCmd = &cobra.Command{ + Use: "versions", + Short: "List versions for a package", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(versionsCmd).Standalone() + rootCmd.AddCommand(versionsCmd) +} diff --git a/completers/fury_completer/cmd/whoami.go b/completers/fury_completer/cmd/whoami.go new file mode 100644 index 0000000000..2b5b4118fc --- /dev/null +++ b/completers/fury_completer/cmd/whoami.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var whoamiCmd = &cobra.Command{ + Use: "whoami", + Short: "Show current account", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(whoamiCmd).Standalone() + rootCmd.AddCommand(whoamiCmd) +} diff --git a/completers/fury_completer/cmd/yank.go b/completers/fury_completer/cmd/yank.go new file mode 100644 index 0000000000..32cd8f9432 --- /dev/null +++ b/completers/fury_completer/cmd/yank.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var yankCmd = &cobra.Command{ + Use: "yank", + Short: "Remove a package version", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(yankCmd).Standalone() + yankCmd.Flags().StringP("version", "v", "", "Version") + rootCmd.AddCommand(yankCmd) +} diff --git a/completers/fury_completer/main.go b/completers/fury_completer/main.go new file mode 100644 index 0000000000..bcb8420077 --- /dev/null +++ b/completers/fury_completer/main.go @@ -0,0 +1,7 @@ +package main + +import "github.com/rsteube/carapace-bin/completers/fury_completer/cmd" + +func main() { + cmd.Execute() +}