Repository: apigee/registry (go)

Issue:
pkg/connection: let's deprecate NewClient and NewClientWithSettings and add NewRegistryClient and NewRegistryClientWithSettings 
https://github.com/apigee/registry/blob/7bc06ba752571bcb29b327c4351e0a810cc9e283/pkg/connection/client.go#L74

Pull request:
replace NewClient with NewRegistryClient
Fixes #660

Patch:
diff --git a/cmd/registry/cmd/annotate/annotate.go b/cmd/registry/cmd/annotate/annotate.go
index 610216b..09b2622 100644
--- a/cmd/registry/cmd/annotate/annotate.go
+++ b/cmd/registry/cmd/annotate/annotate.go
@@ -41,7 +41,7 @@ func Command() *cobra.Command {
 		Args:  cobra.MinimumNArgs(2),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/apply/apply.go b/cmd/registry/cmd/apply/apply.go
index 6aab9ca..725a3ac 100644
--- a/cmd/registry/cmd/apply/apply.go
+++ b/cmd/registry/cmd/apply/apply.go
@@ -36,7 +36,7 @@ func Command() *cobra.Command {
 		Args:  cobra.ExactArgs(0),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/compute/complexity.go b/cmd/registry/cmd/compute/complexity.go
index f45c2a4..07caa9e 100644
--- a/cmd/registry/cmd/compute/complexity.go
+++ b/cmd/registry/cmd/compute/complexity.go
@@ -48,7 +48,7 @@ func complexityCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get dry-run from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/compute/conformance.go b/cmd/registry/cmd/compute/conformance.go
index 384458a..896241c 100644
--- a/cmd/registry/cmd/compute/conformance.go
+++ b/cmd/registry/cmd/compute/conformance.go
@@ -47,7 +47,7 @@ func conformanceCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get dry-run from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/compute/lint.go b/cmd/registry/cmd/compute/lint.go
index 0cf0b03..331e51c 100644
--- a/cmd/registry/cmd/compute/lint.go
+++ b/cmd/registry/cmd/compute/lint.go
@@ -44,7 +44,7 @@ func lintCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get fry-run from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/compute/lintstats.go b/cmd/registry/cmd/compute/lintstats.go
index 11ff545..b228f14 100644
--- a/cmd/registry/cmd/compute/lintstats.go
+++ b/cmd/registry/cmd/compute/lintstats.go
@@ -52,7 +52,7 @@ func lintStatsCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get dry-run from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/compute/references.go b/cmd/registry/cmd/compute/references.go
index bfb2881..9eb4448 100644
--- a/cmd/registry/cmd/compute/references.go
+++ b/cmd/registry/cmd/compute/references.go
@@ -43,7 +43,7 @@ func referencesCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get dry-run from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/compute/score.go b/cmd/registry/cmd/compute/score.go
index a8838b4..fd674df 100644
--- a/cmd/registry/cmd/compute/score.go
+++ b/cmd/registry/cmd/compute/score.go
@@ -43,7 +43,7 @@ func scoreCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get dry-run from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/compute/scorecard.go b/cmd/registry/cmd/compute/scorecard.go
index 2c40e7f..7607579 100644
--- a/cmd/registry/cmd/compute/scorecard.go
+++ b/cmd/registry/cmd/compute/scorecard.go
@@ -42,7 +42,7 @@ func scoreCardCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get dry-run from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/compute/vocabulary.go b/cmd/registry/cmd/compute/vocabulary.go
index 3291b7d..bf76c58 100644
--- a/cmd/registry/cmd/compute/vocabulary.go
+++ b/cmd/registry/cmd/compute/vocabulary.go
@@ -49,7 +49,7 @@ func vocabularyCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get dry-run from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/count/revisions.go b/cmd/registry/cmd/count/revisions.go
index a3639c4..e530ed3 100644
--- a/cmd/registry/cmd/count/revisions.go
+++ b/cmd/registry/cmd/count/revisions.go
@@ -36,7 +36,7 @@ func revisionsCommand() *cobra.Command {
 		Args:  cobra.ExactArgs(1),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/count/versions.go b/cmd/registry/cmd/count/versions.go
index 1178dd1..8d29cfb 100644
--- a/cmd/registry/cmd/count/versions.go
+++ b/cmd/registry/cmd/count/versions.go
@@ -36,7 +36,7 @@ func versionsCommand() *cobra.Command {
 		Args:  cobra.MinimumNArgs(1),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/delete/delete.go b/cmd/registry/cmd/delete/delete.go
index ac6576d..9fb13e5 100644
--- a/cmd/registry/cmd/delete/delete.go
+++ b/cmd/registry/cmd/delete/delete.go
@@ -35,7 +35,7 @@ func Command() *cobra.Command {
 		Args:  cobra.MinimumNArgs(1),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/diff/diff.go b/cmd/registry/cmd/diff/diff.go
index 04e4fbe..bdae810 100644
--- a/cmd/registry/cmd/diff/diff.go
+++ b/cmd/registry/cmd/diff/diff.go
@@ -39,7 +39,7 @@ func Command() *cobra.Command {
 		Args:  cobra.ExactArgs(2),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/export/csv.go b/cmd/registry/cmd/export/csv.go
index 735d161..8476933 100644
--- a/cmd/registry/cmd/export/csv.go
+++ b/cmd/registry/cmd/export/csv.go
@@ -49,7 +49,7 @@ func csvCommand() *cobra.Command {
 		},
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/export/sheet.go b/cmd/registry/cmd/export/sheet.go
index 4c6b967..773efda 100644
--- a/cmd/registry/cmd/export/sheet.go
+++ b/cmd/registry/cmd/export/sheet.go
@@ -45,7 +45,7 @@ func sheetCommand() *cobra.Command {
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
 			var path string
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/export/yaml.go b/cmd/registry/cmd/export/yaml.go
index d849859..98d3dfa 100644
--- a/cmd/registry/cmd/export/yaml.go
+++ b/cmd/registry/cmd/export/yaml.go
@@ -34,7 +34,7 @@ func yamlCommand() *cobra.Command {
 		Args:  cobra.MinimumNArgs(1),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/get/get.go b/cmd/registry/cmd/get/get.go
index 48bf915..bf56ca4 100644
--- a/cmd/registry/cmd/get/get.go
+++ b/cmd/registry/cmd/get/get.go
@@ -30,7 +30,7 @@ func Command() *cobra.Command {
 		Args:  cobra.MinimumNArgs(1),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/index/union.go b/cmd/registry/cmd/index/union.go
index 44f8676..9c0c657 100644
--- a/cmd/registry/cmd/index/union.go
+++ b/cmd/registry/cmd/index/union.go
@@ -38,7 +38,7 @@ func unionCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get filter from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/label/label.go b/cmd/registry/cmd/label/label.go
index 0dc6785..dd05cb6 100644
--- a/cmd/registry/cmd/label/label.go
+++ b/cmd/registry/cmd/label/label.go
@@ -41,7 +41,7 @@ func Command() *cobra.Command {
 		Args:  cobra.MinimumNArgs(2),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/list/list.go b/cmd/registry/cmd/list/list.go
index 052b076..3fbc8ad 100644
--- a/cmd/registry/cmd/list/list.go
+++ b/cmd/registry/cmd/list/list.go
@@ -34,7 +34,7 @@ func Command() *cobra.Command {
 		Args:  cobra.MinimumNArgs(1),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/resolve/resolve.go b/cmd/registry/cmd/resolve/resolve.go
index 18016d4..d97e6b0 100644
--- a/cmd/registry/cmd/resolve/resolve.go
+++ b/cmd/registry/cmd/resolve/resolve.go
@@ -66,7 +66,7 @@ func Command() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Invalid manifest resource name")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/rpc/generated/registry_service.go b/cmd/registry/cmd/rpc/generated/registry_service.go
index cb3b832..1819fc6 100644
--- a/cmd/registry/cmd/rpc/generated/registry_service.go
+++ b/cmd/registry/cmd/rpc/generated/registry_service.go
@@ -59,7 +59,7 @@ var RegistryServiceCmd = &cobra.Command{
 	Long:      "The Registry service allows teams to manage descriptions of APIs.",
 	ValidArgs: RegistrySubCommands,
 	PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
-		RegistryClient, err = connection.NewClient(ctx)
+		RegistryClient, err = connection.NewRegistryClient(ctx)
 		return
 	},
 }
diff --git a/cmd/registry/cmd/upload/artifact.go b/cmd/registry/cmd/upload/artifact.go
index 2ccda3d..f32a1f2 100644
--- a/cmd/registry/cmd/upload/artifact.go
+++ b/cmd/registry/cmd/upload/artifact.go
@@ -48,7 +48,7 @@ func artifactCommand() *cobra.Command {
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to read artifact")
 			}
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/upload/bulk/discovery.go b/cmd/registry/cmd/upload/bulk/discovery.go
index 2aedc5c..eb2134f 100644
--- a/cmd/registry/cmd/upload/bulk/discovery.go
+++ b/cmd/registry/cmd/upload/bulk/discovery.go
@@ -42,7 +42,7 @@ func discoveryCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get project-id from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/upload/bulk/openapi.go b/cmd/registry/cmd/upload/bulk/openapi.go
index 95e4f0d..b34b377 100644
--- a/cmd/registry/cmd/upload/bulk/openapi.go
+++ b/cmd/registry/cmd/upload/bulk/openapi.go
@@ -46,7 +46,7 @@ func openAPICommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get project-id from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/upload/bulk/protos.go b/cmd/registry/cmd/upload/bulk/protos.go
index 3143934..0f11c21 100644
--- a/cmd/registry/cmd/upload/bulk/protos.go
+++ b/cmd/registry/cmd/upload/bulk/protos.go
@@ -60,7 +60,7 @@ func protosCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get project-id from flags")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/upload/csv.go b/cmd/registry/cmd/upload/csv.go
index 9780450..4f0a017 100644
--- a/cmd/registry/cmd/upload/csv.go
+++ b/cmd/registry/cmd/upload/csv.go
@@ -48,7 +48,7 @@ func csvCommand() *cobra.Command {
 				log.Fatalf(ctx, "Invalid delimiter %q: must be exactly one character", delimiter)
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/upload/manifest.go b/cmd/registry/cmd/upload/manifest.go
index 79a3636..ffc5683 100644
--- a/cmd/registry/cmd/upload/manifest.go
+++ b/cmd/registry/cmd/upload/manifest.go
@@ -74,7 +74,7 @@ func manifestCommand() *cobra.Command {
 			}
 
 			manifestData, _ := proto.Marshal(manifest)
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/upload/spec.go b/cmd/registry/cmd/upload/spec.go
index a2d603e..ad8bc5b 100644
--- a/cmd/registry/cmd/upload/spec.go
+++ b/cmd/registry/cmd/upload/spec.go
@@ -43,7 +43,7 @@ func specCommand() *cobra.Command {
 		Args:  cobra.MinimumNArgs(1),
 		Run: func(cmd *cobra.Command, args []string) {
 			ctx := cmd.Context()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/upload/styleguide.go b/cmd/registry/cmd/upload/styleguide.go
index 14a8d3a..c39c886 100644
--- a/cmd/registry/cmd/upload/styleguide.go
+++ b/cmd/registry/cmd/upload/styleguide.go
@@ -72,7 +72,7 @@ func styleGuideCommand() *cobra.Command {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to encode style guide")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/vocabulary/difference.go b/cmd/registry/cmd/vocabulary/difference.go
index 55f442c..7508b51 100644
--- a/cmd/registry/cmd/vocabulary/difference.go
+++ b/cmd/registry/cmd/vocabulary/difference.go
@@ -37,7 +37,7 @@ func differenceCommand() *cobra.Command {
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get output from flags")
 			}
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/vocabulary/intersection.go b/cmd/registry/cmd/vocabulary/intersection.go
index fc03721..66947b9 100644
--- a/cmd/registry/cmd/vocabulary/intersection.go
+++ b/cmd/registry/cmd/vocabulary/intersection.go
@@ -37,7 +37,7 @@ func intersectionCommand() *cobra.Command {
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get output from flags")
 			}
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/vocabulary/union.go b/cmd/registry/cmd/vocabulary/union.go
index 08fd4e5..6841419 100644
--- a/cmd/registry/cmd/vocabulary/union.go
+++ b/cmd/registry/cmd/vocabulary/union.go
@@ -37,7 +37,7 @@ func unionCommand() *cobra.Command {
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get output from flags")
 			}
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/vocabulary/unique.go b/cmd/registry/cmd/vocabulary/unique.go
index 5b1980e..8816728 100644
--- a/cmd/registry/cmd/vocabulary/unique.go
+++ b/cmd/registry/cmd/vocabulary/unique.go
@@ -42,7 +42,7 @@ func uniqueCommand() *cobra.Command {
 				log.Fatal(ctx, "output-id must specify an artifact id (final segment only) and not a full name.")
 			}
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/cmd/vocabulary/versions.go b/cmd/registry/cmd/vocabulary/versions.go
index 0b7d695..c2667e6 100644
--- a/cmd/registry/cmd/vocabulary/versions.go
+++ b/cmd/registry/cmd/vocabulary/versions.go
@@ -39,7 +39,7 @@ func versionsCommand() *cobra.Command {
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get output from flags")
 			}
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 			}
diff --git a/cmd/registry/controller/local-tasks.go b/cmd/registry/controller/local-tasks.go
index a6b4583..e903407 100644
--- a/cmd/registry/controller/local-tasks.go
+++ b/cmd/registry/controller/local-tasks.go
@@ -101,7 +101,7 @@ func (task *ExecCommandTask) Run(ctx context.Context) error {
 }
 
 func touchArtifact(ctx context.Context, artifactName, action string) error {
-	client, err := connection.NewClient(ctx)
+	client, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		log.FromContext(ctx).WithError(err).Fatal("Failed to get client")
 	}
diff --git a/examples/gapic-client/main.go b/examples/gapic-client/main.go
index cbad88f..a99f7d1 100644
--- a/examples/gapic-client/main.go
+++ b/examples/gapic-client/main.go
@@ -26,7 +26,7 @@ import (
 
 func main() {
 	ctx := context.Background()
-	client, err := connection.NewClient(ctx)
+	client, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		log.Fatalf("%s", err.Error())
 	}
diff --git a/pkg/connection/client.go b/pkg/connection/client.go
index 0718a0e..5a062d2 100644
--- a/pkg/connection/client.go
+++ b/pkg/connection/client.go
@@ -50,17 +50,17 @@ func clientOptions(settings Settings) ([]option.ClientOption, error) {
 // RegistryClient is a client of the Registry API
 type RegistryClient = *gapic.RegistryClient
 
-// NewClient creates a new GAPIC client using environment variable settings.
-func NewClient(ctx context.Context) (RegistryClient, error) {
+// NewRegistryClient creates a new GAPIC client using environment variable settings.
+func NewRegistryClient(ctx context.Context) (RegistryClient, error) {
 	settings, err := ActiveSettings()
 	if err != nil {
 		return nil, err
 	}
-	return NewClientWithSettings(ctx, settings)
+	return NewRegistryClientWithSettings(ctx, settings)
 }
 
-// NewClientWithSettings creates a GAPIC client with specified settings.
-func NewClientWithSettings(ctx context.Context, settings Settings) (RegistryClient, error) {
+// NewRegistryClientWithSettings creates a GAPIC client with specified settings.
+func NewRegistryClientWithSettings(ctx context.Context, settings Settings) (RegistryClient, error) {
 	opts, err := clientOptions(settings)
 	if err != nil {
 		return nil, err
diff --git a/tools/GENERATE-CLI.sh b/tools/GENERATE-CLI.sh
index 76b262a..d3d1876 100755
--- a/tools/GENERATE-CLI.sh
+++ b/tools/GENERATE-CLI.sh
@@ -46,7 +46,7 @@ sed -i.bak "/RegistryConfig/d" "${REGISTRY_SERVICE}"
 sed -i.bak "/fmt/d" "${REGISTRY_SERVICE}"
 sed -i.bak "/viper/,/grpc/d" "${REGISTRY_SERVICE}"
 sed -i.bak "/option\.ClientOption/,/NewRegistryClient/d" "${REGISTRY_SERVICE}"
-sed -i.bak "s/return/RegistryClient, err = connection.NewClient\(ctx\)\n\treturn/" "${REGISTRY_SERVICE}"
+sed -i.bak "s/return/RegistryClient, err = connection.NewRegistryClient\(ctx\)\n\treturn/" "${REGISTRY_SERVICE}"
 sed -i.bak "s/apigee\/registry\/gapic.*/apigee\/registry\/gapic\"\n\"github\.com\/apigee\/registry\/pkg\/connection\"/" "${REGISTRY_SERVICE}"
 
 ADMIN_SERVICE=${GENERATED}/admin_service.go


Test patch:
diff --git a/cmd/registry/cmd/annotate/annotate_test.go b/cmd/registry/cmd/annotate/annotate_test.go
index 2507c14..44934cd 100644
--- a/cmd/registry/cmd/annotate/annotate_test.go
+++ b/cmd/registry/cmd/annotate/annotate_test.go
@@ -50,7 +50,7 @@ func TestAnnotate(t *testing.T) {
 
 	// Create a registry client.
 	ctx := context.Background()
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Fatalf("Error creating client: %+v", err)
 	}
diff --git a/cmd/registry/cmd/apply/apply_test.go b/cmd/registry/cmd/apply/apply_test.go
index 837108e..f2ff53d 100644
--- a/cmd/registry/cmd/apply/apply_test.go
+++ b/cmd/registry/cmd/apply/apply_test.go
@@ -65,7 +65,7 @@ func TestApply(t *testing.T) {
 		t.Fatalf("Setup: Failed to create test project: %s", err)
 	}
 
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Fatalf("Setup: Failed to create registry client: %s", err)
 	}
@@ -173,7 +173,7 @@ func TestApplyProject(t *testing.T) {
 		t.Fatalf("Setup: Failed to create test project: %s", err)
 	}
 
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Fatalf("Setup: Failed to create registry client: %s", err)
 	}
diff --git a/cmd/registry/cmd/compute/conformance_test.go b/cmd/registry/cmd/compute/conformance_test.go
index a9a81e6..f80c8fa 100644
--- a/cmd/registry/cmd/compute/conformance_test.go
+++ b/cmd/registry/cmd/compute/conformance_test.go
@@ -348,7 +348,7 @@ func TestConformance(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
diff --git a/cmd/registry/cmd/export/csv_test.go b/cmd/registry/cmd/export/csv_test.go
index 1440b45..0dc2ac6 100644
--- a/cmd/registry/cmd/export/csv_test.go
+++ b/cmd/registry/cmd/export/csv_test.go
@@ -31,7 +31,7 @@ import (
 
 func TestExportCSV(t *testing.T) {
 	ctx := context.Background()
-	client, err := connection.NewClient(ctx)
+	client, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Fatalf("Setup: Failed to create client: %s", err)
 	}
diff --git a/cmd/registry/cmd/label/label_test.go b/cmd/registry/cmd/label/label_test.go
index c2b8ec5..b09abe4 100644
--- a/cmd/registry/cmd/label/label_test.go
+++ b/cmd/registry/cmd/label/label_test.go
@@ -50,7 +50,7 @@ func TestLabel(t *testing.T) {
 
 	// Create a registry client.
 	ctx := context.Background()
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Fatalf("Error creating client: %+v", err)
 	}
diff --git a/cmd/registry/cmd/resolve/resolve_test.go b/cmd/registry/cmd/resolve/resolve_test.go
index 253bf9d..21e9463 100644
--- a/cmd/registry/cmd/resolve/resolve_test.go
+++ b/cmd/registry/cmd/resolve/resolve_test.go
@@ -98,7 +98,7 @@ func TestResolve(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
diff --git a/cmd/registry/cmd/upload/artifact_test.go b/cmd/registry/cmd/upload/artifact_test.go
index 53e1927..31c8039 100644
--- a/cmd/registry/cmd/upload/artifact_test.go
+++ b/cmd/registry/cmd/upload/artifact_test.go
@@ -64,7 +64,7 @@ func TestApiSpecExtensionListArtifactUpload(t *testing.T) {
 
 	SetUpProject(ctx, t, project)
 
-	client, err := connection.NewClient(ctx)
+	client, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Fatalf("Setup: Failed to create client: %s", err)
 	}
@@ -160,7 +160,7 @@ func TestManifestArtifactUpload(t *testing.T) {
 
 			SetUpProject(ctx, t, test.project)
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
@@ -256,7 +256,7 @@ func TestScoreDefinitionArtifactUpload(t *testing.T) {
 
 			SetUpProject(ctx, t, test.project)
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
@@ -328,7 +328,7 @@ func TestScoreCardDefinitionArtifactUpload(t *testing.T) {
 
 			SetUpProject(ctx, t, test.project)
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
@@ -400,7 +400,7 @@ func TestScoreArtifactUpload(t *testing.T) {
 
 			SetUpProject(ctx, t, test.project)
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
@@ -513,7 +513,7 @@ func TestScoreCardArtifactUpload(t *testing.T) {
 
 			SetUpProject(ctx, t, test.project)
 
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
diff --git a/cmd/registry/cmd/upload/csv_test.go b/cmd/registry/cmd/upload/csv_test.go
index 9fdf09c..f4f8079 100644
--- a/cmd/registry/cmd/upload/csv_test.go
+++ b/cmd/registry/cmd/upload/csv_test.go
@@ -118,7 +118,7 @@ func TestUploadCSV(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
diff --git a/cmd/registry/cmd/upload/manifest_test.go b/cmd/registry/cmd/upload/manifest_test.go
index 456c37d..296d583 100644
--- a/cmd/registry/cmd/upload/manifest_test.go
+++ b/cmd/registry/cmd/upload/manifest_test.go
@@ -61,7 +61,7 @@ func TestManifestUpload(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
diff --git a/cmd/registry/cmd/upload/styleguide_test.go b/cmd/registry/cmd/upload/styleguide_test.go
index ac08cb3..dfdd77e 100644
--- a/cmd/registry/cmd/upload/styleguide_test.go
+++ b/cmd/registry/cmd/upload/styleguide_test.go
@@ -74,7 +74,7 @@ func TestStyleGuideUpload(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			client, err := connection.NewClient(ctx)
+			client, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Setup: Failed to create client: %s", err)
 			}
diff --git a/cmd/registry/controller/controller-error-path_test.go b/cmd/registry/controller/controller-error-path_test.go
index 04edced..ce814ef 100644
--- a/cmd/registry/controller/controller-error-path_test.go
+++ b/cmd/registry/controller/controller-error-path_test.go
@@ -140,7 +140,7 @@ func TestControllerErrors(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
diff --git a/cmd/registry/controller/controller_test.go b/cmd/registry/controller/controller_test.go
index 9fd6a4f..f3fa9e6 100644
--- a/cmd/registry/controller/controller_test.go
+++ b/cmd/registry/controller/controller_test.go
@@ -210,7 +210,7 @@ func TestArtifacts(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -347,7 +347,7 @@ func TestAggregateArtifacts(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -546,7 +546,7 @@ func TestDerivedArtifacts(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -642,7 +642,7 @@ func TestReceiptArtifacts(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -751,7 +751,7 @@ func TestReceiptAggArtifacts(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -918,7 +918,7 @@ func TestMultipleEntitiesArtifacts(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -1077,7 +1077,7 @@ func TestRefreshArtifacts(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
diff --git a/cmd/registry/scoring/score_test.go b/cmd/registry/scoring/score_test.go
index f287a3f..c85b3a0 100644
--- a/cmd/registry/scoring/score_test.go
+++ b/cmd/registry/scoring/score_test.go
@@ -457,7 +457,7 @@ func TestCalculateScore(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -527,7 +527,7 @@ func TestCalculateScore(t *testing.T) {
 
 func TestProcessScoreFormula(t *testing.T) {
 	ctx := context.Background()
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Fatalf("Failed to create client: %+v", err)
 	}
@@ -789,7 +789,7 @@ func TestProcessScoreFormulaError(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -1014,7 +1014,7 @@ func TestProcessScoreFormulaTimestamp(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -1063,7 +1063,7 @@ func TestProcessScoreFormulaTimestamp(t *testing.T) {
 
 func TestProcessRollUpFormula(t *testing.T) {
 	ctx := context.Background()
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Fatalf("Failed to create client: %+v", err)
 	}
@@ -1405,7 +1405,7 @@ func TestProcessRollUpFormulaError(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -1798,7 +1798,7 @@ func TestProcessRollUpFormulaTimestamp(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
diff --git a/cmd/registry/scoring/scorecard_test.go b/cmd/registry/scoring/scorecard_test.go
index e63845a..e6c1910 100644
--- a/cmd/registry/scoring/scorecard_test.go
+++ b/cmd/registry/scoring/scorecard_test.go
@@ -492,7 +492,7 @@ func TestCalculateScoreCard(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -1141,7 +1141,7 @@ func TestProcessScorePatterns(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
@@ -1300,7 +1300,7 @@ func TestProcessScorePatternsError(t *testing.T) {
 	for _, test := range tests {
 		t.Run(test.desc, func(t *testing.T) {
 			ctx := context.Background()
-			registryClient, err := connection.NewClient(ctx)
+			registryClient, err := connection.NewRegistryClient(ctx)
 			if err != nil {
 				t.Fatalf("Failed to create client: %+v", err)
 			}
diff --git a/pkg/wipeout/wipeout_test.go b/pkg/wipeout/wipeout_test.go
index 614d892..d5d2cb2 100644
--- a/pkg/wipeout/wipeout_test.go
+++ b/pkg/wipeout/wipeout_test.go
@@ -63,7 +63,7 @@ func TestWipeout(t *testing.T) {
 		t.Fatalf("Setup: Failed to create test project: %s", err)
 	}
 
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Fatalf("Setup: Failed to create registry client: %s", err)
 	}
diff --git a/tests/benchmark/benchmark_helpers.go b/tests/benchmark/benchmark_helpers.go
index 14c0e85..6f9774e 100644
--- a/tests/benchmark/benchmark_helpers.go
+++ b/tests/benchmark/benchmark_helpers.go
@@ -43,7 +43,7 @@ func root() string {
 func setup(b *testing.B) (context.Context, connection.RegistryClient) {
 	b.Helper()
 	ctx := context.Background()
-	client, err := connection.NewClient(ctx)
+	client, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		b.Fatalf("Unable to connect to registry server. Is it running?")
 	}
diff --git a/tests/crud/crud_test.go b/tests/crud/crud_test.go
index 50e96e1..3e7cf83 100644
--- a/tests/crud/crud_test.go
+++ b/tests/crud/crud_test.go
@@ -78,7 +78,7 @@ func readAndGZipFile(filename string) (*bytes.Buffer, error) {
 func TestCRUD(t *testing.T) {
 	// Create a registry client.
 	ctx := context.Background()
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Logf("Failed to create client: %+v", err)
 		t.FailNow()
diff --git a/tests/demo/demo_test.go b/tests/demo/demo_test.go
index a314d63..4200d3c 100644
--- a/tests/demo/demo_test.go
+++ b/tests/demo/demo_test.go
@@ -123,7 +123,7 @@ func TestDemo(t *testing.T) {
 
 	// Create a registry client.
 	ctx := context.Background()
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Logf("Failed to create client: %+v", err)
 		t.FailNow()
diff --git a/tests/filters_test.go b/tests/filters_test.go
index 76b7e2d..f51114d 100644
--- a/tests/filters_test.go
+++ b/tests/filters_test.go
@@ -86,7 +86,7 @@ func TestFilters(t *testing.T) {
 	}
 	// Create a registry client.
 	ctx := context.Background()
-	registryClient, err := connection.NewClient(ctx)
+	registryClient, err := connection.NewRegistryClient(ctx)
 	if err != nil {
 		t.Logf("Failed to create client: %+v", err)
 		t.FailNow()