Skip to content

Commit

Permalink
chore: rename command to align with vault product
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge committed Oct 2, 2023
1 parent a91fa8c commit 16f6b2d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cmd/rootKey.go → cmd/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ import (
"os"

"github.com/spf13/cobra"
"github.com/supabase/cli/internal/root_key/get"
"github.com/supabase/cli/internal/root_key/update"
"github.com/supabase/cli/internal/utils/flags"
"github.com/supabase/cli/internal/vault/get"
"github.com/supabase/cli/internal/vault/update"
)

var (
rootKeyCmd = &cobra.Command{
vaultCmd = &cobra.Command{
GroupID: groupManagementAPI,
Use: "root-key",
Short: "Manage root encryption key",
Use: "vault",
Short: "Manage column encryption of Supabase projects",
}

rootKeyGetCmd = &cobra.Command{
Use: "get",
Use: "get-root-key",
Short: "Get the root encryption key of a Supabase project",
RunE: func(cmd *cobra.Command, args []string) error {
return get.Run(cmd.Context(), flags.ProjectRef)
},
}

rootKeyUpdateCmd = &cobra.Command{
Use: "update",
Use: "update-root-key",
Short: "Update root encryption key of a Supabase project",
RunE: func(cmd *cobra.Command, args []string) error {
return update.Run(cmd.Context(), flags.ProjectRef, os.Stdin)
Expand All @@ -34,8 +34,8 @@ var (
)

func init() {
rootKeyCmd.PersistentFlags().StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.")
rootKeyCmd.AddCommand(rootKeyUpdateCmd)
rootKeyCmd.AddCommand(rootKeyGetCmd)
rootCmd.AddCommand(rootKeyCmd)
vaultCmd.PersistentFlags().StringVar(&flags.ProjectRef, "project-ref", "", "Project ref of the Supabase project.")
vaultCmd.AddCommand(rootKeyUpdateCmd)
vaultCmd.AddCommand(rootKeyGetCmd)
rootCmd.AddCommand(vaultCmd)
}
File renamed without changes.
File renamed without changes.

0 comments on commit 16f6b2d

Please sign in to comment.