github.com/supabase/cli@v1.168.1/internal/encryption/get/get.go (about) 1 package get 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/go-errors/errors" 8 "github.com/supabase/cli/internal/utils" 9 ) 10 11 func Run(ctx context.Context, projectRef string) error { 12 resp, err := utils.GetSupabase().GetPgsodiumConfigWithResponse(ctx, projectRef) 13 if err != nil { 14 return errors.Errorf("failed to retrieve pgsodium config: %w", err) 15 } 16 17 if resp.JSON200 == nil { 18 return errors.New("Unexpected error retrieving project root key: " + string(resp.Body)) 19 } 20 21 fmt.Println(resp.JSON200.RootKey) 22 return nil 23 }