From 7affe4515d0d5cb02e7f77a03dcb3eea56df83c5 Mon Sep 17 00:00:00 2001 From: srinandan <13950006+srinandan@users.noreply.github.com> Date: Tue, 8 Nov 2022 08:34:48 -0800 Subject: [PATCH 1/3] fix cmd args #44 --- cmd/connectors/setinvoke.go | 2 +- cmd/connectors/setviewer.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/connectors/setinvoke.go b/cmd/connectors/setinvoke.go index 41e7da4..c7d4c83 100644 --- a/cmd/connectors/setinvoke.go +++ b/cmd/connectors/setinvoke.go @@ -22,7 +22,7 @@ import ( // SetInvokeCmd to set admin role var SetInvokeCmd = &cobra.Command{ - Use: "setadmin", + Use: "setinvoke", Short: "Set Connection Invoke IAM policy on a Connection", Long: "Set Connection Invoke IAM policy on a Connection", Args: func(cmd *cobra.Command, args []string) (err error) { diff --git a/cmd/connectors/setviewer.go b/cmd/connectors/setviewer.go index 9c0cca7..532880d 100644 --- a/cmd/connectors/setviewer.go +++ b/cmd/connectors/setviewer.go @@ -22,7 +22,7 @@ import ( // SetViewerCmd to set viewer role var SetViewerCmd = &cobra.Command{ - Use: "setadmin", + Use: "setviewer", Short: "Set Connection Viewer IAM policy on a Connection", Long: "Set Connection Viewer IAM policy on a Connection", Args: func(cmd *cobra.Command, args []string) (err error) { From 8591c9d86c6aa4dbd3167aaaadf28effcd812494 Mon Sep 17 00:00:00 2001 From: srinandan <13950006+srinandan@users.noreply.github.com> Date: Tue, 8 Nov 2022 08:37:24 -0800 Subject: [PATCH 2/3] improve docs #45 --- cmd/integrations/execute.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/integrations/execute.go b/cmd/integrations/execute.go index 63a4967..0c9e58d 100644 --- a/cmd/integrations/execute.go +++ b/cmd/integrations/execute.go @@ -58,7 +58,8 @@ func init() { ExecuteCmd.Flags().StringVarP(&name, "name", "n", "", "Integration flow name") ExecuteCmd.Flags().StringVarP(&executionFile, "file", "f", - "", "Integration flow JSON file path") + "", "Integration payload JSON file path. For the payload structure, visit docs at"+ + " https://cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.integrations/execute#request-body") _ = ExecuteCmd.MarkFlagRequired("name") _ = ExecuteCmd.MarkFlagRequired("file") From 0fa866c9e1b5ea4206d1abbf73f7af6c1c894b52 Mon Sep 17 00:00:00 2001 From: srinandan <13950006+srinandan@users.noreply.github.com> Date: Tue, 8 Nov 2022 09:12:57 -0800 Subject: [PATCH 3/3] improve description --- cmd/connectors/setadmin.go | 2 +- cmd/connectors/setcustom.go | 2 +- cmd/connectors/setinvoke.go | 2 +- cmd/connectors/setviewer.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/connectors/setadmin.go b/cmd/connectors/setadmin.go index 951c5c1..32e0d93 100644 --- a/cmd/connectors/setadmin.go +++ b/cmd/connectors/setadmin.go @@ -41,7 +41,7 @@ func init() { SetAdminCmd.Flags().StringVarP(&memberName, "member", "m", "", "Member Name, example Service Account Name") SetAdminCmd.Flags().StringVarP(&memberType, "memberType", "p", - "serviceAccount", "memberType must be serviceAccount, user or group") + "serviceAccount", "memberType must be serviceAccount, user, or group (default serviceAccount)") _ = SetAdminCmd.MarkFlagRequired("name") } diff --git a/cmd/connectors/setcustom.go b/cmd/connectors/setcustom.go index 5a7adef..92a7d70 100644 --- a/cmd/connectors/setcustom.go +++ b/cmd/connectors/setcustom.go @@ -43,7 +43,7 @@ func init() { SetCustomCmd.Flags().StringVarP(&role, "role", "r", "", "Custom IAM role in the format projects/{project-id}/roles/{role}") SetCustomCmd.Flags().StringVarP(&memberType, "memberType", "p", - "serviceAccount", "memberType must be serviceAccount, user or group") + "serviceAccount", "memberType must be serviceAccount, user, or group (default serviceAccount)") _ = SetCustomCmd.MarkFlagRequired("name") _ = SetCustomCmd.MarkFlagRequired("role") diff --git a/cmd/connectors/setinvoke.go b/cmd/connectors/setinvoke.go index c7d4c83..ad3fd02 100644 --- a/cmd/connectors/setinvoke.go +++ b/cmd/connectors/setinvoke.go @@ -41,7 +41,7 @@ func init() { SetInvokeCmd.Flags().StringVarP(&memberName, "member", "m", "", "Member Name, example Service Account Name") SetInvokeCmd.Flags().StringVarP(&memberType, "memberType", "p", - "serviceAccount", "memberType must be serviceAccount, user or group") + "serviceAccount", "memberType must be serviceAccount, user, or group (default serviceAccount)") _ = SetInvokeCmd.MarkFlagRequired("name") } diff --git a/cmd/connectors/setviewer.go b/cmd/connectors/setviewer.go index 532880d..23b2bd2 100644 --- a/cmd/connectors/setviewer.go +++ b/cmd/connectors/setviewer.go @@ -41,7 +41,7 @@ func init() { SetViewerCmd.Flags().StringVarP(&memberName, "member", "m", "", "Member Name, example Service Account Name") SetViewerCmd.Flags().StringVarP(&memberType, "memberType", "p", - "serviceAccount", "memberType must be serviceAccount, user or group") + "serviceAccount", "memberType must be serviceAccount, user, or group (default serviceAccount)") _ = SetViewerCmd.MarkFlagRequired("name") }