diff --git a/cmd/application_cancel.go b/cmd/application_cancel.go index 8d0389c1..0e1b408b 100644 --- a/cmd/application_cancel.go +++ b/cmd/application_cancel.go @@ -31,7 +31,7 @@ var applicationCancelCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_clone.go b/cmd/application_clone.go index aa265aa7..a26e9a98 100644 --- a/cmd/application_clone.go +++ b/cmd/application_clone.go @@ -78,7 +78,7 @@ var applicationCloneCmd = &cobra.Command{ EnvironmentId: targetEnvironmentId, } - clonedService, res, err := client.ApplicationsApi.CloneApplication(context.Background(), application.Id).CloneApplicationRequest(req).Execute() + clonedService, res, err := client.ApplicationsAPI.CloneApplication(context.Background(), application.Id).CloneApplicationRequest(req).Execute() if err != nil { // print http body error message diff --git a/cmd/application_delete.go b/cmd/application_delete.go index 457243e2..d074dc80 100644 --- a/cmd/application_delete.go +++ b/cmd/application_delete.go @@ -58,7 +58,7 @@ var applicationDeleteCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -89,7 +89,7 @@ var applicationDeleteCmd = &cobra.Command{ return } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_deploy.go b/cmd/application_deploy.go index c8eb5e8a..860411bf 100644 --- a/cmd/application_deploy.go +++ b/cmd/application_deploy.go @@ -76,7 +76,7 @@ var applicationDeployCmd = &cobra.Command{ return } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_domain_create.go b/cmd/application_domain_create.go index 35eb9670..fbd4bc5e 100644 --- a/cmd/application_domain_create.go +++ b/cmd/application_domain_create.go @@ -36,7 +36,7 @@ var applicationDomainCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -53,7 +53,7 @@ var applicationDomainCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - customDomains, _, err := client.CustomDomainApi.ListApplicationCustomDomain(context.Background(), application.Id).Execute() + customDomains, _, err := client.CustomDomainAPI.ListApplicationCustomDomain(context.Background(), application.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -74,7 +74,7 @@ var applicationDomainCreateCmd = &cobra.Command{ GenerateCertificate: generateCertificate, } - createdDomain, _, err := client.CustomDomainApi.CreateApplicationCustomDomain(context.Background(), application.Id).CustomDomainRequest(req).Execute() + createdDomain, _, err := client.CustomDomainAPI.CreateApplicationCustomDomain(context.Background(), application.Id).CustomDomainRequest(req).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_domain_delete.go b/cmd/application_domain_delete.go index f3fdddb4..3759d32d 100644 --- a/cmd/application_domain_delete.go +++ b/cmd/application_domain_delete.go @@ -32,7 +32,7 @@ var applicationDomainDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -49,7 +49,7 @@ var applicationDomainDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - customDomains, _, err := client.CustomDomainApi.ListApplicationCustomDomain(context.Background(), application.Id).Execute() + customDomains, _, err := client.CustomDomainAPI.ListApplicationCustomDomain(context.Background(), application.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -64,7 +64,7 @@ var applicationDomainDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - _, err = client.CustomDomainApi.DeleteCustomDomain(context.Background(), application.Id, customDomain.Id).Execute() + _, err = client.CustomDomainAPI.DeleteCustomDomain(context.Background(), application.Id, customDomain.Id).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_domain_edit.go b/cmd/application_domain_edit.go index 522cc057..ae01c29e 100644 --- a/cmd/application_domain_edit.go +++ b/cmd/application_domain_edit.go @@ -34,7 +34,7 @@ var applicationDomainEditCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -51,7 +51,7 @@ var applicationDomainEditCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - customDomains, _, err := client.CustomDomainApi.ListApplicationCustomDomain(context.Background(), application.Id).Execute() + customDomains, _, err := client.CustomDomainAPI.ListApplicationCustomDomain(context.Background(), application.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -72,7 +72,7 @@ var applicationDomainEditCmd = &cobra.Command{ GenerateCertificate: generateCertificate, } - editedDomain, _, err := client.CustomDomainApi.EditCustomDomain(context.Background(), application.Id, customDomain.Id).CustomDomainRequest(req).Execute() + editedDomain, _, err := client.CustomDomainAPI.EditCustomDomain(context.Background(), application.Id, customDomain.Id).CustomDomainRequest(req).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_domain_list.go b/cmd/application_domain_list.go index ba77f5b1..beea2810 100644 --- a/cmd/application_domain_list.go +++ b/cmd/application_domain_list.go @@ -36,7 +36,7 @@ var applicationDomainListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -53,7 +53,7 @@ var applicationDomainListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - customDomains, _, err := client.CustomDomainApi.ListApplicationCustomDomain(context.Background(), application.Id).Execute() + customDomains, _, err := client.CustomDomainAPI.ListApplicationCustomDomain(context.Background(), application.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -61,7 +61,7 @@ var applicationDomainListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - links, _, err := client.ApplicationMainCallsApi.ListApplicationLinks(context.Background(), application.Id).Execute() + links, _, err := client.ApplicationMainCallsAPI.ListApplicationLinks(context.Background(), application.Id).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_env_alias_create.go b/cmd/application_env_alias_create.go index 04c1aa2d..584743e3 100644 --- a/cmd/application_env_alias_create.go +++ b/cmd/application_env_alias_create.go @@ -32,7 +32,7 @@ var applicationEnvAliasCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_env_create.go b/cmd/application_env_create.go index 8348f845..274b2ebe 100644 --- a/cmd/application_env_create.go +++ b/cmd/application_env_create.go @@ -32,7 +32,7 @@ var applicationEnvCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_env_delete.go b/cmd/application_env_delete.go index 476e3913..0f4cff7e 100644 --- a/cmd/application_env_delete.go +++ b/cmd/application_env_delete.go @@ -32,7 +32,7 @@ var applicationEnvDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_env_list.go b/cmd/application_env_list.go index 864bc0da..1c9ecd80 100644 --- a/cmd/application_env_list.go +++ b/cmd/application_env_list.go @@ -32,7 +32,7 @@ var applicationEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -49,7 +49,7 @@ var applicationEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - envVars, _, err := client.ApplicationEnvironmentVariableApi.ListApplicationEnvironmentVariable( + envVars, _, err := client.ApplicationEnvironmentVariableAPI.ListApplicationEnvironmentVariable( context.Background(), application.Id, ).Execute() @@ -60,7 +60,7 @@ var applicationEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - secrets, _, err := client.ApplicationSecretApi.ListApplicationSecrets( + secrets, _, err := client.ApplicationSecretAPI.ListApplicationSecrets( context.Background(), application.Id, ).Execute() diff --git a/cmd/application_env_override_create.go b/cmd/application_env_override_create.go index 0d568f75..8cbd9d93 100644 --- a/cmd/application_env_override_create.go +++ b/cmd/application_env_override_create.go @@ -32,7 +32,7 @@ var applicationEnvOverrideCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_list.go b/cmd/application_list.go index af82524d..898f9a6b 100644 --- a/cmd/application_list.go +++ b/cmd/application_list.go @@ -31,7 +31,7 @@ var applicationListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -39,7 +39,7 @@ var applicationListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_redeploy.go b/cmd/application_redeploy.go index bea1bf8d..d998b355 100644 --- a/cmd/application_redeploy.go +++ b/cmd/application_redeploy.go @@ -32,7 +32,7 @@ var applicationRedeployCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_stop.go b/cmd/application_stop.go index 2eecf8d6..53f724b8 100644 --- a/cmd/application_stop.go +++ b/cmd/application_stop.go @@ -58,7 +58,7 @@ var applicationStopCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -90,7 +90,7 @@ var applicationStopCmd = &cobra.Command{ return } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/application_update.go b/cmd/application_update.go index edc666f1..64962281 100644 --- a/cmd/application_update.go +++ b/cmd/application_update.go @@ -33,7 +33,7 @@ var applicationUpdateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -87,7 +87,7 @@ var applicationUpdateCmd = &cobra.Command{ req.GitRepository.Branch = &applicationBranch } - _, _, err = client.ApplicationMainCallsApi.EditApplication(context.Background(), application.Id).ApplicationEditRequest(req).Execute() + _, _, err = client.ApplicationMainCallsAPI.EditApplication(context.Background(), application.Id).ApplicationEditRequest(req).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/cluster_deploy.go b/cmd/cluster_deploy.go index 6f839df6..78b7e00e 100644 --- a/cmd/cluster_deploy.go +++ b/cmd/cluster_deploy.go @@ -35,7 +35,7 @@ var clusterDeployCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - clusters, _, err := client.ClustersApi.ListOrganizationCluster(context.Background(), orgId).Execute() + clusters, _, err := client.ClustersAPI.ListOrganizationCluster(context.Background(), orgId).Execute() if err != nil { utils.PrintlnError(err) @@ -52,7 +52,7 @@ var clusterDeployCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - _, res, err := client.ClustersApi.DeployCluster(context.Background(), orgId, cluster.Id).Execute() + _, res, err := client.ClustersAPI.DeployCluster(context.Background(), orgId, cluster.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -69,7 +69,7 @@ var clusterDeployCmd = &cobra.Command{ if watchFlag { for { - status, _, err := client.ClustersApi.GetClusterStatus(context.Background(), orgId, cluster.Id).Execute() + status, _, err := client.ClustersAPI.GetClusterStatus(context.Background(), orgId, cluster.Id).Execute() if err != nil { utils.PrintlnError(err) } diff --git a/cmd/cluster_list.go b/cmd/cluster_list.go index 6b106c11..c0c0e677 100644 --- a/cmd/cluster_list.go +++ b/cmd/cluster_list.go @@ -33,7 +33,7 @@ var clusterListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - clusters, _, err := client.ClustersApi.ListOrganizationCluster(context.Background(), orgId).Execute() + clusters, _, err := client.ClustersAPI.ListOrganizationCluster(context.Background(), orgId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/cluster_stop.go b/cmd/cluster_stop.go index 47b03975..289507d6 100644 --- a/cmd/cluster_stop.go +++ b/cmd/cluster_stop.go @@ -33,7 +33,7 @@ var clusterStopCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - clusters, _, err := client.ClustersApi.ListOrganizationCluster(context.Background(), orgId).Execute() + clusters, _, err := client.ClustersAPI.ListOrganizationCluster(context.Background(), orgId).Execute() if err != nil { utils.PrintlnError(err) @@ -50,7 +50,7 @@ var clusterStopCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - _, _, err = client.ClustersApi.StopCluster(context.Background(), orgId, cluster.Id).Execute() + _, _, err = client.ClustersAPI.StopCluster(context.Background(), orgId, cluster.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -60,7 +60,7 @@ var clusterStopCmd = &cobra.Command{ if watchFlag { for { - status, _, err := client.ClustersApi.GetClusterStatus(context.Background(), orgId, cluster.Id).Execute() + status, _, err := client.ClustersAPI.GetClusterStatus(context.Background(), orgId, cluster.Id).Execute() if err != nil { utils.PrintlnError(err) } diff --git a/cmd/container_cancel.go b/cmd/container_cancel.go index 6d24a298..bb15e9a0 100644 --- a/cmd/container_cancel.go +++ b/cmd/container_cancel.go @@ -31,7 +31,7 @@ var containerCancelCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_clone.go b/cmd/container_clone.go index 1b3c9eb8..93d3b618 100644 --- a/cmd/container_clone.go +++ b/cmd/container_clone.go @@ -78,7 +78,7 @@ var containerCloneCmd = &cobra.Command{ EnvironmentId: targetEnvironmentId, } - clonedService, res, err := client.ContainersApi.CloneContainer(context.Background(), container.Id).CloneContainerRequest(req).Execute() + clonedService, res, err := client.ContainersAPI.CloneContainer(context.Background(), container.Id).CloneContainerRequest(req).Execute() if err != nil { // print http body error message diff --git a/cmd/container_delete.go b/cmd/container_delete.go index bf784929..f384ef19 100644 --- a/cmd/container_delete.go +++ b/cmd/container_delete.go @@ -58,7 +58,7 @@ var containerDeleteCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -89,7 +89,7 @@ var containerDeleteCmd = &cobra.Command{ return } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_deploy.go b/cmd/container_deploy.go index 8110f62a..a4bd2909 100644 --- a/cmd/container_deploy.go +++ b/cmd/container_deploy.go @@ -76,7 +76,7 @@ var containerDeployCmd = &cobra.Command{ return } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_domain_create.go b/cmd/container_domain_create.go index f02e4af5..77c811d5 100644 --- a/cmd/container_domain_create.go +++ b/cmd/container_domain_create.go @@ -36,7 +36,7 @@ var containerDomainCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -53,7 +53,7 @@ var containerDomainCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - customDomains, _, err := client.ContainerCustomDomainApi.ListContainerCustomDomain(context.Background(), container.Id).Execute() + customDomains, _, err := client.ContainerCustomDomainAPI.ListContainerCustomDomain(context.Background(), container.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -74,7 +74,7 @@ var containerDomainCreateCmd = &cobra.Command{ GenerateCertificate: generateCertificate, } - createdDomain, _, err := client.ContainerCustomDomainApi.CreateContainerCustomDomain(context.Background(), container.Id).CustomDomainRequest(req).Execute() + createdDomain, _, err := client.ContainerCustomDomainAPI.CreateContainerCustomDomain(context.Background(), container.Id).CustomDomainRequest(req).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_domain_delete.go b/cmd/container_domain_delete.go index c0154c96..f017943b 100644 --- a/cmd/container_domain_delete.go +++ b/cmd/container_domain_delete.go @@ -32,7 +32,7 @@ var containerDomainDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -49,7 +49,7 @@ var containerDomainDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - customDomains, _, err := client.ContainerCustomDomainApi.ListContainerCustomDomain(context.Background(), container.Id).Execute() + customDomains, _, err := client.ContainerCustomDomainAPI.ListContainerCustomDomain(context.Background(), container.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -64,7 +64,7 @@ var containerDomainDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - _, err = client.ContainerCustomDomainApi.DeleteContainerCustomDomain(context.Background(), container.Id, customDomain.Id).Execute() + _, err = client.ContainerCustomDomainAPI.DeleteContainerCustomDomain(context.Background(), container.Id, customDomain.Id).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_domain_edit.go b/cmd/container_domain_edit.go index 5ceac198..c5931540 100644 --- a/cmd/container_domain_edit.go +++ b/cmd/container_domain_edit.go @@ -34,7 +34,7 @@ var containerDomainEditCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -51,7 +51,7 @@ var containerDomainEditCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - customDomains, _, err := client.ContainerCustomDomainApi.ListContainerCustomDomain(context.Background(), container.Id).Execute() + customDomains, _, err := client.ContainerCustomDomainAPI.ListContainerCustomDomain(context.Background(), container.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -72,7 +72,7 @@ var containerDomainEditCmd = &cobra.Command{ GenerateCertificate: generateCertificate, } - editedDomain, _, err := client.ContainerCustomDomainApi.EditContainerCustomDomain(context.Background(), container.Id, customDomain.Id).CustomDomainRequest(req).Execute() + editedDomain, _, err := client.ContainerCustomDomainAPI.EditContainerCustomDomain(context.Background(), container.Id, customDomain.Id).CustomDomainRequest(req).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_domain_list.go b/cmd/container_domain_list.go index 7033191f..398c69e0 100644 --- a/cmd/container_domain_list.go +++ b/cmd/container_domain_list.go @@ -36,7 +36,7 @@ var containerDomainListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -53,7 +53,7 @@ var containerDomainListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - customDomains, _, err := client.ContainerCustomDomainApi.ListContainerCustomDomain(context.Background(), container.Id).Execute() + customDomains, _, err := client.ContainerCustomDomainAPI.ListContainerCustomDomain(context.Background(), container.Id).Execute() if err != nil { utils.PrintlnError(err) @@ -76,7 +76,7 @@ var containerDomainListCmd = &cobra.Command{ }) } - links, _, err := client.ContainerMainCallsApi.ListContainerLinks(context.Background(), container.Id).Execute() + links, _, err := client.ContainerMainCallsAPI.ListContainerLinks(context.Background(), container.Id).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_env_alias_create.go b/cmd/container_env_alias_create.go index 34fad065..b6fc31c9 100644 --- a/cmd/container_env_alias_create.go +++ b/cmd/container_env_alias_create.go @@ -32,7 +32,7 @@ var containerEnvAliasCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_env_create.go b/cmd/container_env_create.go index d64e0923..d6dfb738 100644 --- a/cmd/container_env_create.go +++ b/cmd/container_env_create.go @@ -32,7 +32,7 @@ var containerEnvCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_env_delete.go b/cmd/container_env_delete.go index ff231593..6d05aca7 100644 --- a/cmd/container_env_delete.go +++ b/cmd/container_env_delete.go @@ -32,7 +32,7 @@ var containerEnvDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_env_list.go b/cmd/container_env_list.go index df2bc830..c87ed089 100644 --- a/cmd/container_env_list.go +++ b/cmd/container_env_list.go @@ -32,7 +32,7 @@ var containerEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -49,7 +49,7 @@ var containerEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - envVars, _, err := client.ContainerEnvironmentVariableApi.ListContainerEnvironmentVariable( + envVars, _, err := client.ContainerEnvironmentVariableAPI.ListContainerEnvironmentVariable( context.Background(), container.Id, ).Execute() @@ -60,7 +60,7 @@ var containerEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - secrets, _, err := client.ContainerSecretApi.ListContainerSecrets( + secrets, _, err := client.ContainerSecretAPI.ListContainerSecrets( context.Background(), container.Id, ).Execute() diff --git a/cmd/container_env_override_create.go b/cmd/container_env_override_create.go index 9e65eed0..da6bf97d 100644 --- a/cmd/container_env_override_create.go +++ b/cmd/container_env_override_create.go @@ -32,7 +32,7 @@ var containerEnvOverrideCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_list.go b/cmd/container_list.go index 6c7347fe..17eb3867 100644 --- a/cmd/container_list.go +++ b/cmd/container_list.go @@ -29,7 +29,7 @@ var containerListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -37,7 +37,7 @@ var containerListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_redeploy.go b/cmd/container_redeploy.go index d7d37e05..d11aad6a 100644 --- a/cmd/container_redeploy.go +++ b/cmd/container_redeploy.go @@ -32,7 +32,7 @@ var containerRedeployCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_stop.go b/cmd/container_stop.go index 4b7a4af1..b0f7d4c4 100644 --- a/cmd/container_stop.go +++ b/cmd/container_stop.go @@ -58,7 +58,7 @@ var containerStopCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -90,7 +90,7 @@ var containerStopCmd = &cobra.Command{ return } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/container_update.go b/cmd/container_update.go index 331ea8bb..a0212ed1 100644 --- a/cmd/container_update.go +++ b/cmd/container_update.go @@ -34,7 +34,7 @@ var containerUpdateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -101,7 +101,7 @@ var containerUpdateCmd = &cobra.Command{ AutoPreview: utils.Bool(container.AutoPreview), } - _, res, err := client.ContainerMainCallsApi.EditContainer(context.Background(), container.Id).ContainerRequest(req).Execute() + _, res, err := client.ContainerMainCallsAPI.EditContainer(context.Background(), container.Id).ContainerRequest(req).Execute() if err != nil { // print http body error message diff --git a/cmd/cronjob.go b/cmd/cronjob.go index 8112938e..fe916894 100644 --- a/cmd/cronjob.go +++ b/cmd/cronjob.go @@ -37,7 +37,7 @@ func init() { } func ListCronjobs(envId string, client *qovery.APIClient) ([]qovery.JobResponse, error) { - jobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + jobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { return nil, err diff --git a/cmd/cronjob_cancel.go b/cmd/cronjob_cancel.go index 89a7de0e..e8fb1682 100644 --- a/cmd/cronjob_cancel.go +++ b/cmd/cronjob_cancel.go @@ -31,7 +31,7 @@ var cronjobCancelCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - cronjobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + cronjobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/cronjob_clone.go b/cmd/cronjob_clone.go index ae5dafaf..6126af1f 100644 --- a/cmd/cronjob_clone.go +++ b/cmd/cronjob_clone.go @@ -78,7 +78,7 @@ var cronjobCloneCmd = &cobra.Command{ EnvironmentId: targetEnvironmentId, } - clonedService, res, err := client.JobsApi.CloneJob(context.Background(), job.Id).CloneJobRequest(req).Execute() + clonedService, res, err := client.JobsAPI.CloneJob(context.Background(), job.Id).CloneJobRequest(req).Execute() if err != nil { // print http body error message diff --git a/cmd/cronjob_deploy.go b/cmd/cronjob_deploy.go index ba92f786..b1e04399 100644 --- a/cmd/cronjob_deploy.go +++ b/cmd/cronjob_deploy.go @@ -99,8 +99,8 @@ var cronjobDeployCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - docker := cronjob.Source.Docker.Get() - image := cronjob.Source.Image.Get() + docker := cronjob.Source.JobResponseAllOfSourceOneOf1.Docker + image := cronjob.Source.JobResponseAllOfSourceOneOf.Image var req qovery.JobDeployRequest @@ -114,7 +114,7 @@ var cronjobDeployCmd = &cobra.Command{ } } else { req = qovery.JobDeployRequest{ - ImageTag: image.Tag, + ImageTag: &image.Tag, } if cronjobTag != "" { diff --git a/cmd/cronjob_env_alias_create.go b/cmd/cronjob_env_alias_create.go index db277887..711a662c 100644 --- a/cmd/cronjob_env_alias_create.go +++ b/cmd/cronjob_env_alias_create.go @@ -32,7 +32,7 @@ var cronjobEnvAliasCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - cronjobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + cronjobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/cronjob_env_create.go b/cmd/cronjob_env_create.go index 84ac8051..4fbfdff0 100644 --- a/cmd/cronjob_env_create.go +++ b/cmd/cronjob_env_create.go @@ -32,7 +32,7 @@ var cronjobEnvCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - cronjobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + cronjobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/cronjob_env_delete.go b/cmd/cronjob_env_delete.go index dd1b492a..5d6f33b0 100644 --- a/cmd/cronjob_env_delete.go +++ b/cmd/cronjob_env_delete.go @@ -32,7 +32,7 @@ var cronjobEnvDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - cronjobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + cronjobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/cronjob_env_list.go b/cmd/cronjob_env_list.go index 90b58bf5..772a6309 100644 --- a/cmd/cronjob_env_list.go +++ b/cmd/cronjob_env_list.go @@ -32,7 +32,7 @@ var cronjobEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - cronjobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + cronjobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -49,7 +49,7 @@ var cronjobEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - envVars, _, err := client.JobEnvironmentVariableApi.ListJobEnvironmentVariable( + envVars, _, err := client.JobEnvironmentVariableAPI.ListJobEnvironmentVariable( context.Background(), cronjob.Id, ).Execute() @@ -60,7 +60,7 @@ var cronjobEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - secrets, _, err := client.JobSecretApi.ListJobSecrets( + secrets, _, err := client.JobSecretAPI.ListJobSecrets( context.Background(), cronjob.Id, ).Execute() diff --git a/cmd/cronjob_env_override_create.go b/cmd/cronjob_env_override_create.go index a2c3c09c..0c466904 100644 --- a/cmd/cronjob_env_override_create.go +++ b/cmd/cronjob_env_override_create.go @@ -32,7 +32,7 @@ var cronjobEnvOverrideCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - cronjobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + cronjobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/cronjob_list.go b/cmd/cronjob_list.go index 564e01b8..82b191ef 100644 --- a/cmd/cronjob_list.go +++ b/cmd/cronjob_list.go @@ -41,7 +41,7 @@ var cronjobListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/cronjob_update.go b/cmd/cronjob_update.go index a1cae96f..ead606e1 100644 --- a/cmd/cronjob_update.go +++ b/cmd/cronjob_update.go @@ -64,8 +64,8 @@ var cronjobUpdateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - docker := cronjob.Source.Docker.Get() - image := cronjob.Source.Image.Get() + docker := cronjob.Source.JobResponseAllOfSourceOneOf1.Docker + image := cronjob.Source.JobResponseAllOfSourceOneOf.Image if docker != nil && (cronjobTag != "" || cronjobImageName != "") { utils.PrintlnError(fmt.Errorf("you can't use --tag or --image-name with a cronjob targetting a Dockerfile. Use --branch instead")) @@ -94,7 +94,7 @@ var cronjobUpdateCmd = &cobra.Command{ req.Source.Docker.Set(nil) } - _, res, err := client.JobMainCallsApi.EditJob(context.Background(), cronjob.Id).JobRequest(req).Execute() + _, res, err := client.JobMainCallsAPI.EditJob(context.Background(), cronjob.Id).JobRequest(req).Execute() if err != nil { result, _ := io.ReadAll(res.Body) diff --git a/cmd/database_delete.go b/cmd/database_delete.go index ec906cb2..4b63103f 100644 --- a/cmd/database_delete.go +++ b/cmd/database_delete.go @@ -58,7 +58,7 @@ var databaseDeleteCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - databases, _, err := client.DatabasesApi.ListDatabase(context.Background(), envId).Execute() + databases, _, err := client.DatabasesAPI.ListDatabase(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -90,7 +90,7 @@ var databaseDeleteCmd = &cobra.Command{ return } - databases, _, err := client.DatabasesApi.ListDatabase(context.Background(), envId).Execute() + databases, _, err := client.DatabasesAPI.ListDatabase(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/database_deploy.go b/cmd/database_deploy.go index 5fa869ef..11d23968 100644 --- a/cmd/database_deploy.go +++ b/cmd/database_deploy.go @@ -32,7 +32,7 @@ var databaseDeployCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - databases, _, err := client.DatabasesApi.ListDatabase(context.Background(), envId).Execute() + databases, _, err := client.DatabasesAPI.ListDatabase(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/database_list.go b/cmd/database_list.go index 1dd0a379..35f472be 100644 --- a/cmd/database_list.go +++ b/cmd/database_list.go @@ -34,7 +34,7 @@ var databaseListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - databases, _, err := client.DatabasesApi.ListDatabase(context.Background(), envId).Execute() + databases, _, err := client.DatabasesAPI.ListDatabase(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -42,7 +42,7 @@ var databaseListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -58,7 +58,7 @@ var databaseListCmd = &cobra.Command{ var data [][]string for _, database := range databases.GetResults() { - res, _, err := client.DatabaseMainCallsApi.GetDatabaseMasterCredentials(context.Background(), database.Id).Execute() + res, _, err := client.DatabaseMainCallsAPI.GetDatabaseMasterCredentials(context.Background(), database.Id).Execute() if err != nil { utils.PrintlnError(err) os.Exit(1) @@ -96,7 +96,7 @@ func getDatabaseJsonOutput(client qovery.APIClient, statuses []qovery.Status, da var results []interface{} for _, database := range databases { - res, _, err := client.DatabaseMainCallsApi.GetDatabaseMasterCredentials(context.Background(), database.Id).Execute() + res, _, err := client.DatabaseMainCallsAPI.GetDatabaseMasterCredentials(context.Background(), database.Id).Execute() if err != nil { utils.PrintlnError(err) os.Exit(1) diff --git a/cmd/database_redeploy.go b/cmd/database_redeploy.go index e78033a0..ddb31159 100644 --- a/cmd/database_redeploy.go +++ b/cmd/database_redeploy.go @@ -32,7 +32,7 @@ var databaseRedeployCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - databases, _, err := client.DatabasesApi.ListDatabase(context.Background(), envId).Execute() + databases, _, err := client.DatabasesAPI.ListDatabase(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/database_stop.go b/cmd/database_stop.go index 84686bee..8b23aaf1 100644 --- a/cmd/database_stop.go +++ b/cmd/database_stop.go @@ -58,7 +58,7 @@ var databaseStopCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - databases, _, err := client.DatabasesApi.ListDatabase(context.Background(), envId).Execute() + databases, _, err := client.DatabasesAPI.ListDatabase(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -90,7 +90,7 @@ var databaseStopCmd = &cobra.Command{ return } - databases, _, err := client.DatabasesApi.ListDatabase(context.Background(), envId).Execute() + databases, _, err := client.DatabasesAPI.ListDatabase(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_cancel.go b/cmd/environment_cancel.go index 8528c1f1..ee1239ae 100644 --- a/cmd/environment_cancel.go +++ b/cmd/environment_cancel.go @@ -31,7 +31,7 @@ var environmentCancelCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - _, _, err = client.EnvironmentActionsApi.CancelEnvironmentDeployment(context.Background(), envId).Execute() + _, _, err = client.EnvironmentActionsAPI.CancelEnvironmentDeployment(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_clone.go b/cmd/environment_clone.go index 612d6a56..c164c954 100644 --- a/cmd/environment_clone.go +++ b/cmd/environment_clone.go @@ -40,7 +40,7 @@ var environmentCloneCmd = &cobra.Command{ } if clusterName != "" { - clusters, _, err := client.ClustersApi.ListOrganizationCluster(context.Background(), orgId).Execute() + clusters, _, err := client.ClustersAPI.ListOrganizationCluster(context.Background(), orgId).Execute() if err == nil { for _, c := range clusters.GetResults() { @@ -63,7 +63,7 @@ var environmentCloneCmd = &cobra.Command{ } } - _, res, err := client.EnvironmentActionsApi.CloneEnvironment(context.Background(), envId).CloneRequest(req).Execute() + _, res, err := client.EnvironmentActionsAPI.CloneEnvironment(context.Background(), envId).CloneRequest(req).Execute() if err != nil { // print http body error message diff --git a/cmd/environment_delete.go b/cmd/environment_delete.go index 99076295..b557b60a 100644 --- a/cmd/environment_delete.go +++ b/cmd/environment_delete.go @@ -44,7 +44,7 @@ var environmentDeleteCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - _, err = client.EnvironmentMainCallsApi.DeleteEnvironment(context.Background(), envId).Execute() + _, err = client.EnvironmentMainCallsAPI.DeleteEnvironment(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_deploy.go b/cmd/environment_deploy.go index 1981118c..de02b455 100644 --- a/cmd/environment_deploy.go +++ b/cmd/environment_deploy.go @@ -44,7 +44,7 @@ var environmentDeployCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - _, _, err = client.EnvironmentActionsApi.DeployEnvironment(context.Background(), envId).Execute() + _, _, err = client.EnvironmentActionsAPI.DeployEnvironment(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_deployment_explain.go b/cmd/environment_deployment_explain.go index 2a490f6d..baab0600 100644 --- a/cmd/environment_deployment_explain.go +++ b/cmd/environment_deployment_explain.go @@ -49,7 +49,7 @@ var environmentDeploymentExplainCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - environment, _, err := client.EnvironmentMainCallsApi.GetEnvironment(context.Background(), environmentId).Execute() + environment, _, err := client.EnvironmentMainCallsAPI.GetEnvironment(context.Background(), environmentId).Execute() if err != nil { utils.PrintlnError(err) @@ -57,7 +57,7 @@ var environmentDeploymentExplainCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - logsQuery := client.EnvironmentLogsApi.ListEnvironmentLogs(context.Background(), environmentId) + logsQuery := client.EnvironmentLogsAPI.ListEnvironmentLogs(context.Background(), environmentId) if id != "" { logsQuery = logsQuery.Version(id) } diff --git a/cmd/environment_deployment_list.go b/cmd/environment_deployment_list.go index 0f21fc29..9cfb6a47 100644 --- a/cmd/environment_deployment_list.go +++ b/cmd/environment_deployment_list.go @@ -31,7 +31,7 @@ var environmentDeploymentListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - deployments, _, err := client.EnvironmentDeploymentHistoryApi.ListEnvironmentDeploymentHistory(context.Background(), environmentId).Execute() + deployments, _, err := client.EnvironmentDeploymentHistoryAPI.ListEnvironmentDeploymentHistory(context.Background(), environmentId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_list.go b/cmd/environment_list.go index 6ae8589b..3bde68ec 100644 --- a/cmd/environment_list.go +++ b/cmd/environment_list.go @@ -32,7 +32,7 @@ var environmentListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - environments, _, err := client.EnvironmentsApi.ListEnvironment(context.Background(), projectId).Execute() + environments, _, err := client.EnvironmentsAPI.ListEnvironment(context.Background(), projectId).Execute() if err != nil { utils.PrintlnError(err) @@ -40,7 +40,7 @@ var environmentListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - statuses, _, err := client.EnvironmentsApi.GetProjectEnvironmentsStatus(context.Background(), projectId).Execute() + statuses, _, err := client.EnvironmentsAPI.GetProjectEnvironmentsStatus(context.Background(), projectId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_redeploy.go b/cmd/environment_redeploy.go index a6e849ad..63eec3ec 100644 --- a/cmd/environment_redeploy.go +++ b/cmd/environment_redeploy.go @@ -44,7 +44,7 @@ var environmentRedeployCmd = &cobra.Command{ time.Sleep(5 * time.Second) } - _, _, err = client.EnvironmentActionsApi.RedeployEnvironment(context.Background(), envId).Execute() + _, _, err = client.EnvironmentActionsAPI.RedeployEnvironment(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_stage_create.go b/cmd/environment_stage_create.go index 8c0e2fb6..de642722 100644 --- a/cmd/environment_stage_create.go +++ b/cmd/environment_stage_create.go @@ -41,7 +41,7 @@ var environmentStageCreateCmd = &cobra.Command{ req.Description = desc } - _, _, err = client.DeploymentStageMainCallsApi.CreateEnvironmentDeploymentStage(context.Background(), environmentId).DeploymentStageRequest(req).Execute() + _, _, err = client.DeploymentStageMainCallsAPI.CreateEnvironmentDeploymentStage(context.Background(), environmentId).DeploymentStageRequest(req).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_stage_delete.go b/cmd/environment_stage_delete.go index 233a5902..3819ce95 100644 --- a/cmd/environment_stage_delete.go +++ b/cmd/environment_stage_delete.go @@ -31,7 +31,7 @@ var environmentStageDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - stages, _, err := client.DeploymentStageMainCallsApi.ListEnvironmentDeploymentStage(context.Background(), environmentId).Execute() + stages, _, err := client.DeploymentStageMainCallsAPI.ListEnvironmentDeploymentStage(context.Background(), environmentId).Execute() if err != nil { utils.PrintlnError(err) @@ -47,7 +47,7 @@ var environmentStageDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - _, err = client.DeploymentStageMainCallsApi.DeleteDeploymentStage(context.Background(), stage.GetId()).Execute() + _, err = client.DeploymentStageMainCallsAPI.DeleteDeploymentStage(context.Background(), stage.GetId()).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_stage_edit.go b/cmd/environment_stage_edit.go index c9326d04..7d6c111d 100644 --- a/cmd/environment_stage_edit.go +++ b/cmd/environment_stage_edit.go @@ -30,7 +30,7 @@ var environmentStageEditCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - stages, _, err := client.DeploymentStageMainCallsApi.ListEnvironmentDeploymentStage(context.Background(), environmentId).Execute() + stages, _, err := client.DeploymentStageMainCallsAPI.ListEnvironmentDeploymentStage(context.Background(), environmentId).Execute() if err != nil { utils.PrintlnError(err) @@ -57,7 +57,7 @@ var environmentStageEditCmd = &cobra.Command{ req.Description = desc } - _, _, err = client.DeploymentStageMainCallsApi.EditDeploymentStage(context.Background(), stage.GetId()).DeploymentStageRequest(req).Execute() + _, _, err = client.DeploymentStageMainCallsAPI.EditDeploymentStage(context.Background(), stage.GetId()).DeploymentStageRequest(req).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_stage_list.go b/cmd/environment_stage_list.go index 8afd86a7..3836ea0a 100644 --- a/cmd/environment_stage_list.go +++ b/cmd/environment_stage_list.go @@ -34,7 +34,7 @@ var environmentStageListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - stages, _, err := client.DeploymentStageMainCallsApi.ListEnvironmentDeploymentStage(context.Background(), environmentId).Execute() + stages, _, err := client.DeploymentStageMainCallsAPI.ListEnvironmentDeploymentStage(context.Background(), environmentId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_stage_move.go b/cmd/environment_stage_move.go index 717ff783..bc929f3a 100644 --- a/cmd/environment_stage_move.go +++ b/cmd/environment_stage_move.go @@ -31,7 +31,7 @@ var environmentStageMoveCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - stages, _, err := client.DeploymentStageMainCallsApi.ListEnvironmentDeploymentStage(context.Background(), environmentId).Execute() + stages, _, err := client.DeploymentStageMainCallsAPI.ListEnvironmentDeploymentStage(context.Background(), environmentId).Execute() if err != nil { utils.PrintlnError(err) @@ -73,7 +73,7 @@ var environmentStageMoveCmd = &cobra.Command{ req.Description = desc } - _, _, err = client.DeploymentStageMainCallsApi.AttachServiceToDeploymentStage(context.Background(), stage.GetId(), service.GetServiceId()).Execute() + _, _, err = client.DeploymentStageMainCallsAPI.AttachServiceToDeploymentStage(context.Background(), stage.GetId(), service.GetServiceId()).Execute() if err != nil { utils.PrintlnError(err) @@ -89,7 +89,7 @@ func getServiceByName(client *qovery.APIClient, services []qovery.DeploymentStag for _, service := range services { switch service.GetServiceType() { case "APPLICATION": - application, _, err := client.ApplicationMainCallsApi.GetApplication(context.Background(), service.GetServiceId()).Execute() + application, _, err := client.ApplicationMainCallsAPI.GetApplication(context.Background(), service.GetServiceId()).Execute() if err != nil { return nil, err } @@ -98,7 +98,7 @@ func getServiceByName(client *qovery.APIClient, services []qovery.DeploymentStag return &service, nil } case "DATABASE": - database, _, err := client.DatabaseMainCallsApi.GetDatabase(context.Background(), service.GetServiceId()).Execute() + database, _, err := client.DatabaseMainCallsAPI.GetDatabase(context.Background(), service.GetServiceId()).Execute() if err != nil { return nil, err } @@ -107,7 +107,7 @@ func getServiceByName(client *qovery.APIClient, services []qovery.DeploymentStag return &service, nil } case "CONTAINER": - container, _, err := client.ContainerMainCallsApi.GetContainer(context.Background(), service.GetServiceId()).Execute() + container, _, err := client.ContainerMainCallsAPI.GetContainer(context.Background(), service.GetServiceId()).Execute() if err != nil { return nil, err } @@ -116,7 +116,7 @@ func getServiceByName(client *qovery.APIClient, services []qovery.DeploymentStag return &service, nil } case "JOB": - job, _, err := client.JobMainCallsApi.GetJob(context.Background(), service.GetServiceId()).Execute() + job, _, err := client.JobMainCallsAPI.GetJob(context.Background(), service.GetServiceId()).Execute() if err != nil { return nil, err } diff --git a/cmd/environment_stop.go b/cmd/environment_stop.go index 88710000..1c0cabf7 100644 --- a/cmd/environment_stop.go +++ b/cmd/environment_stop.go @@ -43,7 +43,7 @@ var environmentStopCmd = &cobra.Command{ utils.Println(fmt.Sprintf("Waiting for environment %s to be ready..", pterm.FgBlue.Sprintf(envId))) time.Sleep(5 * time.Second) } - _, _, err = client.EnvironmentActionsApi.StopEnvironment(context.Background(), envId).Execute() + _, _, err = client.EnvironmentActionsAPI.StopEnvironment(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/environment_update.go b/cmd/environment_update.go index f455e6ec..3fc5b027 100644 --- a/cmd/environment_update.go +++ b/cmd/environment_update.go @@ -33,7 +33,7 @@ var environmentUpdateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - environments, _, err := client.EnvironmentsApi.ListEnvironment(context.Background(), projectId).Execute() + environments, _, err := client.EnvironmentsAPI.ListEnvironment(context.Background(), projectId).Execute() if err != nil { utils.PrintlnError(err) @@ -65,7 +65,7 @@ var environmentUpdateCmd = &cobra.Command{ req.Mode = &m } - _, _, err = client.EnvironmentMainCallsApi.EditEnvironment(context.Background(), env.Id).EnvironmentEditRequest(req).Execute() + _, _, err = client.EnvironmentMainCallsAPI.EditEnvironment(context.Background(), env.Id).EnvironmentEditRequest(req).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/lifecycle.go b/cmd/lifecycle.go index 6a95708e..15afa5dd 100644 --- a/cmd/lifecycle.go +++ b/cmd/lifecycle.go @@ -36,7 +36,7 @@ func init() { } func ListLifecycleJobs(envId string, client *qovery.APIClient) ([]qovery.JobResponse, error) { - jobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + jobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { return nil, err diff --git a/cmd/lifecycle_cancel.go b/cmd/lifecycle_cancel.go index 286bc261..7a2a92f4 100644 --- a/cmd/lifecycle_cancel.go +++ b/cmd/lifecycle_cancel.go @@ -31,7 +31,7 @@ var lifecycleCancelCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - lifecycles, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + lifecycles, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/lifecycle_clone.go b/cmd/lifecycle_clone.go index 845a659c..558290fb 100644 --- a/cmd/lifecycle_clone.go +++ b/cmd/lifecycle_clone.go @@ -78,7 +78,7 @@ var lifecycleCloneCmd = &cobra.Command{ EnvironmentId: targetEnvironmentId, } - clonedService, res, err := client.JobsApi.CloneJob(context.Background(), job.Id).CloneJobRequest(req).Execute() + clonedService, res, err := client.JobsAPI.CloneJob(context.Background(), job.Id).CloneJobRequest(req).Execute() if err != nil { // print http body error message diff --git a/cmd/lifecycle_deploy.go b/cmd/lifecycle_deploy.go index 272e9bd2..db476c45 100644 --- a/cmd/lifecycle_deploy.go +++ b/cmd/lifecycle_deploy.go @@ -99,8 +99,8 @@ var lifecycleDeployCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - docker := lifecycle.Source.Docker.Get() - image := lifecycle.Source.Image.Get() + docker := lifecycle.Source.JobResponseAllOfSourceOneOf1.Docker + image := lifecycle.Source.JobResponseAllOfSourceOneOf.Image var req qovery.JobDeployRequest @@ -114,7 +114,7 @@ var lifecycleDeployCmd = &cobra.Command{ } } else { req = qovery.JobDeployRequest{ - ImageTag: image.Tag, + ImageTag: &image.Tag, } if lifecycleTag != "" { diff --git a/cmd/lifecycle_env_alias_create.go b/cmd/lifecycle_env_alias_create.go index 21a56011..80a8e522 100644 --- a/cmd/lifecycle_env_alias_create.go +++ b/cmd/lifecycle_env_alias_create.go @@ -32,7 +32,7 @@ var lifecycleEnvAliasCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - lifecycles, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + lifecycles, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/lifecycle_env_create.go b/cmd/lifecycle_env_create.go index d7fcd412..52f95d27 100644 --- a/cmd/lifecycle_env_create.go +++ b/cmd/lifecycle_env_create.go @@ -32,7 +32,7 @@ var lifecycleEnvCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - lifecycles, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + lifecycles, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/lifecycle_env_delete.go b/cmd/lifecycle_env_delete.go index b68a26ef..1b5e1227 100644 --- a/cmd/lifecycle_env_delete.go +++ b/cmd/lifecycle_env_delete.go @@ -32,7 +32,7 @@ var lifecycleEnvDeleteCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - lifecycles, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + lifecycles, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/lifecycle_env_list.go b/cmd/lifecycle_env_list.go index f6bf130d..0400eabb 100644 --- a/cmd/lifecycle_env_list.go +++ b/cmd/lifecycle_env_list.go @@ -32,7 +32,7 @@ var lifecycleEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - lifecycles, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + lifecycles, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -49,7 +49,7 @@ var lifecycleEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - envVars, _, err := client.JobEnvironmentVariableApi.ListJobEnvironmentVariable( + envVars, _, err := client.JobEnvironmentVariableAPI.ListJobEnvironmentVariable( context.Background(), lifecycle.Id, ).Execute() @@ -60,7 +60,7 @@ var lifecycleEnvListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - secrets, _, err := client.JobSecretApi.ListJobSecrets( + secrets, _, err := client.JobSecretAPI.ListJobSecrets( context.Background(), lifecycle.Id, ).Execute() diff --git a/cmd/lifecycle_env_override_create.go b/cmd/lifecycle_env_override_create.go index 423502b6..91866695 100644 --- a/cmd/lifecycle_env_override_create.go +++ b/cmd/lifecycle_env_override_create.go @@ -32,7 +32,7 @@ var lifecycleEnvOverrideCreateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - lifecycles, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + lifecycles, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/lifecycle_list.go b/cmd/lifecycle_list.go index 8af55cdc..175cd419 100644 --- a/cmd/lifecycle_list.go +++ b/cmd/lifecycle_list.go @@ -42,7 +42,7 @@ var lifecycleListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/lifecycle_update.go b/cmd/lifecycle_update.go index 0b77fe04..0f660912 100644 --- a/cmd/lifecycle_update.go +++ b/cmd/lifecycle_update.go @@ -64,8 +64,8 @@ var lifecycleUpdateCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - docker := lifecycle.Source.Docker.Get() - image := lifecycle.Source.Image.Get() + docker := lifecycle.Source.JobResponseAllOfSourceOneOf1.Docker + image := lifecycle.Source.JobResponseAllOfSourceOneOf.Image if docker != nil && (lifecycleTag != "" || lifecycleImageName != "") { utils.PrintlnError(fmt.Errorf("you can't use --tag or --image-name with a lifecycle targetting a Dockerfile. Use --branch instead")) @@ -94,7 +94,7 @@ var lifecycleUpdateCmd = &cobra.Command{ req.Source.Docker.Set(nil) } - _, res, err := client.JobMainCallsApi.EditJob(context.Background(), lifecycle.Id).JobRequest(req).Execute() + _, res, err := client.JobMainCallsAPI.EditJob(context.Background(), lifecycle.Id).JobRequest(req).Execute() if err != nil { result, _ := io.ReadAll(res.Body) diff --git a/cmd/log.go b/cmd/log.go index 8e3f0890..fe4fbc1b 100644 --- a/cmd/log.go +++ b/cmd/log.go @@ -38,7 +38,7 @@ func getLogs() string { panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } client := utils.GetQoveryClient(tokenType, token) - e, res, err := client.EnvironmentMainCallsApi.GetEnvironment(context.Background(), string(env)).Execute() + e, res, err := client.EnvironmentMainCallsAPI.GetEnvironment(context.Background(), string(env)).Execute() if err != nil { utils.PrintlnError(err) os.Exit(1) diff --git a/cmd/service_list.go b/cmd/service_list.go index 807d0996..36d1270b 100644 --- a/cmd/service_list.go +++ b/cmd/service_list.go @@ -43,7 +43,7 @@ var serviceListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - apps, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + apps, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -51,7 +51,7 @@ var serviceListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - databases, _, err := client.DatabasesApi.ListDatabase(context.Background(), envId).Execute() + databases, _, err := client.DatabasesAPI.ListDatabase(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -59,7 +59,7 @@ var serviceListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -67,7 +67,7 @@ var serviceListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - jobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + jobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -75,7 +75,7 @@ var serviceListCmd = &cobra.Command{ panic("unreachable") // staticcheck false positive: https://staticcheck.io/docs/checks#SA5011 } - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) @@ -177,7 +177,7 @@ func getOrganizationContextResourceId(qoveryAPIClient *qovery.APIClient, organiz } // find organization by name - organizations, _, err := qoveryAPIClient.OrganizationMainCallsApi.ListOrganization(context.Background()).Execute() + organizations, _, err := qoveryAPIClient.OrganizationMainCallsAPI.ListOrganization(context.Background()).Execute() if err != nil { return "", err @@ -207,7 +207,7 @@ func getProjectContextResourceId(qoveryAPIClient *qovery.APIClient, projectName } // find project id by name - projects, _, err := qoveryAPIClient.ProjectsApi.ListProject(context.Background(), organizationId).Execute() + projects, _, err := qoveryAPIClient.ProjectsAPI.ListProject(context.Background(), organizationId).Execute() if err != nil { return "", err @@ -237,7 +237,7 @@ func getEnvironmentContextResourceId(qoveryAPIClient *qovery.APIClient, environm } // find environment id by name - environments, _, err := qoveryAPIClient.EnvironmentsApi.ListEnvironment(context.Background(), projectId).Execute() + environments, _, err := qoveryAPIClient.EnvironmentsAPI.ListEnvironment(context.Background(), projectId).Execute() if err != nil { return "", err @@ -258,7 +258,7 @@ func getApplicationContextResource(qoveryAPIClient *qovery.APIClient, applicatio } // find applications id by name - applications, _, err := qoveryAPIClient.ApplicationsApi.ListApplication(context.Background(), environmentId).Execute() + applications, _, err := qoveryAPIClient.ApplicationsAPI.ListApplication(context.Background(), environmentId).Execute() if err != nil { return nil, err @@ -280,7 +280,7 @@ func getContainerContextResource(qoveryAPIClient *qovery.APIClient, containerNam } // find containers id by name - containers, _, err := qoveryAPIClient.ContainersApi.ListContainer(context.Background(), environmentId).Execute() + containers, _, err := qoveryAPIClient.ContainersAPI.ListContainer(context.Background(), environmentId).Execute() if err != nil { return nil, err @@ -302,7 +302,7 @@ func getJobContextResource(qoveryAPIClient *qovery.APIClient, jobName string, en } // find jobs id by name - jobs, _, err := qoveryAPIClient.JobsApi.ListJobs(context.Background(), environmentId).Execute() + jobs, _, err := qoveryAPIClient.JobsAPI.ListJobs(context.Background(), environmentId).Execute() if err != nil { return nil, err @@ -381,7 +381,7 @@ func getServiceJsonOutput(statuses qovery.EnvironmentStatuses, apps []qovery.App } func getMarkdownOutput(client qovery.APIClient, orgId string, projectId string, envId string, apps []qovery.Application, containers []qovery.ContainerResponse, jobs []qovery.JobResponse, databases []qovery.Database) string { - env, _, err := client.EnvironmentMainCallsApi.GetEnvironment(context.Background(), envId).Execute() + env, _, err := client.EnvironmentMainCallsAPI.GetEnvironment(context.Background(), envId).Execute() if err != nil { utils.PrintlnError(err) os.Exit(1) @@ -450,7 +450,7 @@ Powered by [Qovery](https://qovery.com).` } func getApplicationPreviewUrl(client qovery.APIClient, appId string) *string { - links, _, err := client.ApplicationMainCallsApi.ListApplicationLinks(context.Background(), appId).Execute() + links, _, err := client.ApplicationMainCallsAPI.ListApplicationLinks(context.Background(), appId).Execute() if err != nil { utils.PrintlnError(err) @@ -468,7 +468,7 @@ func getApplicationPreviewUrl(client qovery.APIClient, appId string) *string { } func getContainerPreviewUrl(client qovery.APIClient, containerId string) *string { - links, _, err := client.ContainerMainCallsApi.ListContainerLinks(context.Background(), containerId).Execute() + links, _, err := client.ContainerMainCallsAPI.ListContainerLinks(context.Background(), containerId).Execute() if err != nil { utils.PrintlnError(err) diff --git a/cmd/shell.go b/cmd/shell.go index faf957e6..8f027b26 100644 --- a/cmd/shell.go +++ b/cmd/shell.go @@ -121,7 +121,7 @@ func shellRequestFromContext(currentContext utils.QoveryContext) (*pkg.ShellRequ client := utils.GetQoveryClient(tokenType, token) - e, res, err := client.EnvironmentMainCallsApi.GetEnvironment(context.Background(), string(currentContext.EnvironmentId)).Execute() + e, res, err := client.EnvironmentMainCallsAPI.GetEnvironment(context.Background(), string(currentContext.EnvironmentId)).Execute() if err != nil { return nil, err } @@ -178,35 +178,35 @@ func shellRequestWithApplicationUrl(args []string) (*pkg.ShellRequest, error) { switch envService.Type { case utils.ApplicationType: - applicationApi, err := utils.GetApplicationById(serviceId) + applicationAPI, err := utils.GetApplicationById(serviceId) if err != nil { return nil, err } service = utils.Service{ - ID: applicationApi.ID, - Name: applicationApi.Name, + ID: applicationAPI.ID, + Name: applicationAPI.Name, Type: utils.ApplicationType, } case utils.ContainerType: - containerApi, err := utils.GetContainerById(serviceId) + containerAPI, err := utils.GetContainerById(serviceId) if err != nil { return nil, err } service = utils.Service{ - ID: containerApi.ID, - Name: containerApi.Name, + ID: containerAPI.ID, + Name: containerAPI.Name, Type: utils.ContainerType, } case utils.JobType: - jobApi, err := utils.GetJobById(serviceId) + jobAPI, err := utils.GetJobById(serviceId) if err != nil { return nil, err } service = utils.Service{ - ID: jobApi.ID, - Name: jobApi.Name, + ID: jobAPI.ID, + Name: jobAPI.Name, Type: utils.JobType, } diff --git a/cmd/status.go b/cmd/status.go index 0a1447c2..d991dfc5 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -30,7 +30,7 @@ var statusCmd = &cobra.Command{ switch service.Type { case utils.ApplicationType: - status, res, err := client.ApplicationMainCallsApi.GetApplicationStatus(context.Background(), string(service.ID)).Execute() + status, res, err := client.ApplicationMainCallsAPI.GetApplicationStatus(context.Background(), string(service.ID)).Execute() if err != nil { utils.PrintlnError(err) os.Exit(0) @@ -45,7 +45,7 @@ var statusCmd = &cobra.Command{ os.Exit(0) } case utils.ContainerType: - status, res, err := client.ContainerMainCallsApi.GetContainerStatus(context.Background(), string(service.ID)).Execute() + status, res, err := client.ContainerMainCallsAPI.GetContainerStatus(context.Background(), string(service.ID)).Execute() if err != nil { utils.PrintlnError(err) os.Exit(0) diff --git a/cmd/token.go b/cmd/token.go index 60facf5c..13dbe4e3 100644 --- a/cmd/token.go +++ b/cmd/token.go @@ -55,7 +55,7 @@ func generateMachineToMachineAPIToken(tokenInformation *utils.TokenInformation) } client := utils.GetQoveryClient(tokenType, token) - createdToken, res, err := client.OrganizationApiTokenApi.CreateOrganizationApiToken(context.Background(), string(tokenInformation.Organization.ID)).OrganizationApiTokenCreateRequest(req).Execute() + createdToken, res, err := client.OrganizationApiTokenAPI.CreateOrganizationApiToken(context.Background(), string(tokenInformation.Organization.ID)).OrganizationApiTokenCreateRequest(req).Execute() if err != nil { return "", err } diff --git a/go.mod b/go.mod index 42b04c50..4a914653 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/posthog/posthog-go v0.0.0-20221221115252-24dfed35d71a github.com/pterm/pterm v0.12.55 - github.com/qovery/qovery-client-go v0.0.0-20231005085710-02b1085fcf27 + github.com/qovery/qovery-client-go v0.0.0-20231011161912-c7440f44509f github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 944923e7..0350ce7b 100644 --- a/go.sum +++ b/go.sum @@ -299,6 +299,8 @@ github.com/qovery/qovery-client-go v0.0.0-20231004152120-c3f72c7ff7aa h1:gym7RXH github.com/qovery/qovery-client-go v0.0.0-20231004152120-c3f72c7ff7aa/go.mod h1:7su0Zq+YniKNRSXNJsdrbR2/dGn7UHz3QJ2WpcxyP8k= github.com/qovery/qovery-client-go v0.0.0-20231005085710-02b1085fcf27 h1:biZ8BWw9tzYSMHz+ohs6B6DTEoQQBaXdZyU7BRA0taA= github.com/qovery/qovery-client-go v0.0.0-20231005085710-02b1085fcf27/go.mod h1:7su0Zq+YniKNRSXNJsdrbR2/dGn7UHz3QJ2WpcxyP8k= +github.com/qovery/qovery-client-go v0.0.0-20231011161912-c7440f44509f h1:pa41jP49/RCVmO8iaiFZF2mFtw0UUPD5h6no52jkBKQ= +github.com/qovery/qovery-client-go v0.0.0-20231011161912-c7440f44509f/go.mod h1:5QD7sC1Z6XCCYd31c4XKVwGdEOjvtgG0NDcaVDoWb+o= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= diff --git a/utils/env_var.go b/utils/env_var.go index f2c87074..aaeaa07a 100644 --- a/utils/env_var.go +++ b/utils/env_var.go @@ -189,35 +189,35 @@ func CreateEnvironmentVariable( switch strings.ToUpper(scope) { case "PROJECT": - _, _, err := client.ProjectEnvironmentVariableApi.CreateProjectEnvironmentVariable( + _, _, err := client.ProjectEnvironmentVariableAPI.CreateProjectEnvironmentVariable( context.Background(), projectId, ).EnvironmentVariableRequest(req).Execute() return err case "ENVIRONMENT": - _, _, err := client.EnvironmentVariableApi.CreateEnvironmentEnvironmentVariable( + _, _, err := client.EnvironmentVariableAPI.CreateEnvironmentEnvironmentVariable( context.Background(), environmentId, ).EnvironmentVariableRequest(req).Execute() return err case "APPLICATION": - _, _, err := client.ApplicationEnvironmentVariableApi.CreateApplicationEnvironmentVariable( + _, _, err := client.ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariable( context.Background(), serviceId, ).EnvironmentVariableRequest(req).Execute() return err case "JOB": - _, _, err := client.JobEnvironmentVariableApi.CreateJobEnvironmentVariable( + _, _, err := client.JobEnvironmentVariableAPI.CreateJobEnvironmentVariable( context.Background(), serviceId, ).EnvironmentVariableRequest(req).Execute() return err case "CONTAINER": - _, _, err := client.ContainerEnvironmentVariableApi.CreateContainerEnvironmentVariable( + _, _, err := client.ContainerEnvironmentVariableAPI.CreateContainerEnvironmentVariable( context.Background(), serviceId, ).EnvironmentVariableRequest(req).Execute() @@ -245,35 +245,35 @@ func CreateSecret( switch strings.ToUpper(scope) { case "PROJECT": - _, _, err := client.ProjectSecretApi.CreateProjectSecret( + _, _, err := client.ProjectSecretAPI.CreateProjectSecret( context.Background(), projectId, ).SecretRequest(req).Execute() return err case "ENVIRONMENT": - _, _, err := client.EnvironmentSecretApi.CreateEnvironmentSecret( + _, _, err := client.EnvironmentSecretAPI.CreateEnvironmentSecret( context.Background(), environmentId, ).SecretRequest(req).Execute() return err case "APPLICATION": - _, _, err := client.ApplicationSecretApi.CreateApplicationSecret( + _, _, err := client.ApplicationSecretAPI.CreateApplicationSecret( context.Background(), serviceId, ).SecretRequest(req).Execute() return err case "JOB": - _, _, err := client.JobSecretApi.CreateJobSecret( + _, _, err := client.JobSecretAPI.CreateJobSecret( context.Background(), serviceId, ).SecretRequest(req).Execute() return err case "CONTAINER": - _, _, err := client.ContainerSecretApi.CreateContainerSecret( + _, _, err := client.ContainerSecretAPI.CreateContainerSecret( context.Background(), serviceId, ).SecretRequest(req).Execute() @@ -313,21 +313,21 @@ func ListEnvironmentVariables( switch serviceType { case ApplicationType: - r, _, err := client.ApplicationEnvironmentVariableApi.ListApplicationEnvironmentVariable(context.Background(), serviceId).Execute() + r, _, err := client.ApplicationEnvironmentVariableAPI.ListApplicationEnvironmentVariable(context.Background(), serviceId).Execute() if err != nil { return nil, err } res = r case ContainerType: - r, _, err := client.ContainerEnvironmentVariableApi.ListContainerEnvironmentVariable(context.Background(), serviceId).Execute() + r, _, err := client.ContainerEnvironmentVariableAPI.ListContainerEnvironmentVariable(context.Background(), serviceId).Execute() if err != nil { return nil, err } res = r case JobType: - r, _, err := client.JobEnvironmentVariableApi.ListJobEnvironmentVariable(context.Background(), serviceId).Execute() + r, _, err := client.JobEnvironmentVariableAPI.ListJobEnvironmentVariable(context.Background(), serviceId).Execute() if err != nil { return nil, err } @@ -351,21 +351,21 @@ func ListSecrets( switch serviceType { case ApplicationType: - r, _, err := client.ApplicationSecretApi.ListApplicationSecrets(context.Background(), serviceId).Execute() + r, _, err := client.ApplicationSecretAPI.ListApplicationSecrets(context.Background(), serviceId).Execute() if err != nil { return nil, err } res = r case ContainerType: - r, _, err := client.ContainerSecretApi.ListContainerSecrets(context.Background(), serviceId).Execute() + r, _, err := client.ContainerSecretAPI.ListContainerSecrets(context.Background(), serviceId).Execute() if err != nil { return nil, err } res = r case JobType: - r, _, err := client.JobSecretApi.ListJobSecrets(context.Background(), serviceId).Execute() + r, _, err := client.JobSecretAPI.ListJobSecrets(context.Background(), serviceId).Execute() if err != nil { return nil, err } @@ -401,7 +401,7 @@ func DeleteEnvironmentVariableByKey( switch string(envVar.Scope) { case "PROJECT": - _, err := client.ProjectEnvironmentVariableApi.DeleteProjectEnvironmentVariable( + _, err := client.ProjectEnvironmentVariableAPI.DeleteProjectEnvironmentVariable( context.Background(), projectId, envVar.Id, @@ -409,7 +409,7 @@ func DeleteEnvironmentVariableByKey( return err case "ENVIRONMENT": - _, err := client.EnvironmentVariableApi.DeleteEnvironmentEnvironmentVariable( + _, err := client.EnvironmentVariableAPI.DeleteEnvironmentEnvironmentVariable( context.Background(), environmentId, envVar.Id, @@ -417,7 +417,7 @@ func DeleteEnvironmentVariableByKey( return err case "APPLICATION": - _, err := client.ApplicationEnvironmentVariableApi.DeleteApplicationEnvironmentVariable( + _, err := client.ApplicationEnvironmentVariableAPI.DeleteApplicationEnvironmentVariable( context.Background(), serviceId, envVar.Id, @@ -425,7 +425,7 @@ func DeleteEnvironmentVariableByKey( return err case "JOB": - _, err := client.JobEnvironmentVariableApi.DeleteJobEnvironmentVariable( + _, err := client.JobEnvironmentVariableAPI.DeleteJobEnvironmentVariable( context.Background(), serviceId, envVar.Id, @@ -433,7 +433,7 @@ func DeleteEnvironmentVariableByKey( return err case "CONTAINER": - _, err := client.ContainerEnvironmentVariableApi.DeleteContainerEnvironmentVariable( + _, err := client.ContainerEnvironmentVariableAPI.DeleteContainerEnvironmentVariable( context.Background(), serviceId, envVar.Id, @@ -466,7 +466,7 @@ func DeleteSecretByKey( switch string(secret.Scope) { case "PROJECT": - _, err := client.ProjectSecretApi.DeleteProjectSecret( + _, err := client.ProjectSecretAPI.DeleteProjectSecret( context.Background(), projectId, secret.Id, @@ -474,7 +474,7 @@ func DeleteSecretByKey( return err case "ENVIRONMENT": - _, err := client.EnvironmentVariableApi.DeleteEnvironmentEnvironmentVariable( + _, err := client.EnvironmentVariableAPI.DeleteEnvironmentEnvironmentVariable( context.Background(), environmentId, secret.Id, @@ -482,7 +482,7 @@ func DeleteSecretByKey( return err case "APPLICATION": - _, err := client.ApplicationSecretApi.DeleteApplicationSecret( + _, err := client.ApplicationSecretAPI.DeleteApplicationSecret( context.Background(), serviceId, secret.Id, @@ -490,7 +490,7 @@ func DeleteSecretByKey( return err case "JOB": - _, err := client.JobSecretApi.DeleteJobSecret( + _, err := client.JobSecretAPI.DeleteJobSecret( context.Background(), serviceId, secret.Id, @@ -498,7 +498,7 @@ func DeleteSecretByKey( return err case "CONTAINER": - _, err := client.ContainerSecretApi.DeleteContainerSecret( + _, err := client.ContainerSecretAPI.DeleteContainerSecret( context.Background(), serviceId, secret.Id, @@ -544,7 +544,7 @@ func CreateEnvironmentVariableAlias( switch strings.ToUpper(scope) { case "PROJECT": - _, _, err := client.ProjectEnvironmentVariableApi.CreateProjectEnvironmentVariableAlias( + _, _, err := client.ProjectEnvironmentVariableAPI.CreateProjectEnvironmentVariableAlias( context.Background(), projectId, parentEnvironmentVariableId, @@ -552,7 +552,7 @@ func CreateEnvironmentVariableAlias( return err case "ENVIRONMENT": - _, _, err := client.EnvironmentVariableApi.CreateEnvironmentEnvironmentVariableAlias( + _, _, err := client.EnvironmentVariableAPI.CreateEnvironmentEnvironmentVariableAlias( context.Background(), environmentId, parentEnvironmentVariableId, @@ -560,7 +560,7 @@ func CreateEnvironmentVariableAlias( return err case "APPLICATION": - _, _, err := client.ApplicationEnvironmentVariableApi.CreateApplicationEnvironmentVariableAlias( + _, _, err := client.ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariableAlias( context.Background(), serviceId, parentEnvironmentVariableId, @@ -568,7 +568,7 @@ func CreateEnvironmentVariableAlias( return err case "JOB": - _, _, err := client.JobEnvironmentVariableApi.CreateJobEnvironmentVariableAlias( + _, _, err := client.JobEnvironmentVariableAPI.CreateJobEnvironmentVariableAlias( context.Background(), serviceId, parentEnvironmentVariableId, @@ -576,7 +576,7 @@ func CreateEnvironmentVariableAlias( return err case "CONTAINER": - _, _, err := client.ContainerEnvironmentVariableApi.CreateContainerEnvironmentVariableAlias( + _, _, err := client.ContainerEnvironmentVariableAPI.CreateContainerEnvironmentVariableAlias( context.Background(), serviceId, parentEnvironmentVariableId, @@ -601,7 +601,7 @@ func CreateSecretAlias( switch strings.ToUpper(scope) { case "PROJECT": - _, _, err := client.ProjectSecretApi.CreateProjectSecretAlias( + _, _, err := client.ProjectSecretAPI.CreateProjectSecretAlias( context.Background(), projectId, parentSecretId, @@ -609,7 +609,7 @@ func CreateSecretAlias( return err case "ENVIRONMENT": - _, _, err := client.EnvironmentSecretApi.CreateEnvironmentSecretAlias( + _, _, err := client.EnvironmentSecretAPI.CreateEnvironmentSecretAlias( context.Background(), environmentId, parentSecretId, @@ -617,7 +617,7 @@ func CreateSecretAlias( return err case "APPLICATION": - _, _, err := client.ApplicationSecretApi.CreateApplicationSecretAlias( + _, _, err := client.ApplicationSecretAPI.CreateApplicationSecretAlias( context.Background(), serviceId, parentSecretId, @@ -625,7 +625,7 @@ func CreateSecretAlias( return err case "JOB": - _, _, err := client.JobSecretApi.CreateJobSecretAlias( + _, _, err := client.JobSecretAPI.CreateJobSecretAlias( context.Background(), serviceId, parentSecretId, @@ -633,7 +633,7 @@ func CreateSecretAlias( return err case "CONTAINER": - _, _, err := client.ContainerSecretApi.CreateContainerSecretAlias( + _, _, err := client.ContainerSecretAPI.CreateContainerSecretAlias( context.Background(), serviceId, parentSecretId, @@ -697,7 +697,7 @@ func CreateEnvironmentVariableOverride( switch strings.ToUpper(scope) { case "PROJECT": - _, _, err := client.ProjectEnvironmentVariableApi.CreateProjectEnvironmentVariableOverride( + _, _, err := client.ProjectEnvironmentVariableAPI.CreateProjectEnvironmentVariableOverride( context.Background(), projectId, parentEnvironmentVariableId, @@ -705,7 +705,7 @@ func CreateEnvironmentVariableOverride( return err case "ENVIRONMENT": - _, _, err := client.EnvironmentVariableApi.CreateEnvironmentEnvironmentVariableOverride( + _, _, err := client.EnvironmentVariableAPI.CreateEnvironmentEnvironmentVariableOverride( context.Background(), environmentId, parentEnvironmentVariableId, @@ -713,7 +713,7 @@ func CreateEnvironmentVariableOverride( return err case "APPLICATION": - _, _, err := client.ApplicationEnvironmentVariableApi.CreateApplicationEnvironmentVariableOverride( + _, _, err := client.ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariableOverride( context.Background(), serviceId, parentEnvironmentVariableId, @@ -721,7 +721,7 @@ func CreateEnvironmentVariableOverride( return err case "JOB": - _, _, err := client.JobEnvironmentVariableApi.CreateJobEnvironmentVariableOverride( + _, _, err := client.JobEnvironmentVariableAPI.CreateJobEnvironmentVariableOverride( context.Background(), serviceId, parentEnvironmentVariableId, @@ -729,7 +729,7 @@ func CreateEnvironmentVariableOverride( return err case "CONTAINER": - _, _, err := client.ContainerEnvironmentVariableApi.CreateContainerEnvironmentVariableOverride( + _, _, err := client.ContainerEnvironmentVariableAPI.CreateContainerEnvironmentVariableOverride( context.Background(), serviceId, parentEnvironmentVariableId, @@ -757,7 +757,7 @@ func CreateSecretOverride( switch strings.ToUpper(scope) { case "PROJECT": - _, _, err := client.ProjectSecretApi.CreateProjectSecretOverride( + _, _, err := client.ProjectSecretAPI.CreateProjectSecretOverride( context.Background(), projectId, parentSecretId, @@ -765,7 +765,7 @@ func CreateSecretOverride( return err case "ENVIRONMENT": - _, _, err := client.EnvironmentSecretApi.CreateEnvironmentSecretOverride( + _, _, err := client.EnvironmentSecretAPI.CreateEnvironmentSecretOverride( context.Background(), environmentId, parentSecretId, @@ -773,7 +773,7 @@ func CreateSecretOverride( return err case "APPLICATION": - _, _, err := client.ApplicationSecretApi.CreateApplicationSecretOverride( + _, _, err := client.ApplicationSecretAPI.CreateApplicationSecretOverride( context.Background(), serviceId, parentSecretId, @@ -781,7 +781,7 @@ func CreateSecretOverride( return err case "JOB": - _, _, err := client.JobSecretApi.CreateJobSecretOverride( + _, _, err := client.JobSecretAPI.CreateJobSecretOverride( context.Background(), serviceId, parentSecretId, @@ -789,7 +789,7 @@ func CreateSecretOverride( return err case "CONTAINER": - _, _, err := client.ContainerSecretApi.CreateContainerSecretOverride( + _, _, err := client.ContainerSecretAPI.CreateContainerSecretOverride( context.Background(), serviceId, parentSecretId, diff --git a/utils/qovery.go b/utils/qovery.go index d7baeaa0..7d247d7f 100644 --- a/utils/qovery.go +++ b/utils/qovery.go @@ -59,7 +59,7 @@ func SelectRole(organization *Organization) (*Role, error) { client := GetQoveryClient(tokenType, token) - roles, res, err := client.OrganizationMainCallsApi.ListOrganizationAvailableRoles(context.Background(), string(organization.ID)).Execute() + roles, res, err := client.OrganizationMainCallsAPI.ListOrganizationAvailableRoles(context.Background(), string(organization.ID)).Execute() if err != nil { return nil, err } @@ -71,8 +71,8 @@ func SelectRole(organization *Organization) (*Role, error) { var rolesIds = make(map[string]string) for _, role := range roles.GetResults() { - roleNames = append(roleNames, *role.Name) - rolesIds[*role.Name] = *role.Id + roleNames = append(roleNames, role.Name) + rolesIds[role.Name] = role.Id } if len(roleNames) < 1 { @@ -106,7 +106,7 @@ func SelectOrganization() (*Organization, error) { client := GetQoveryClient(tokenType, token) - organizations, res, err := client.OrganizationMainCallsApi.ListOrganization(context.Background()).Execute() + organizations, res, err := client.OrganizationMainCallsAPI.ListOrganization(context.Background()).Execute() if err != nil { return nil, err } @@ -172,7 +172,7 @@ func GetOrganizationById(id string) (*Organization, error) { client := GetQoveryClient(tokenType, token) - organization, res, err := client.OrganizationMainCallsApi.GetOrganization(context.Background(), id).Execute() + organization, res, err := client.OrganizationMainCallsAPI.GetOrganization(context.Background(), id).Execute() if res.StatusCode >= 400 { return nil, errors.New("Received " + res.Status + " response while getting organization " + id) } @@ -194,7 +194,7 @@ func SelectProject(organizationID Id) (*Project, error) { client := GetQoveryClient(tokenType, token) - p, res, err := client.ProjectsApi.ListProject(context.Background(), string(organizationID)).Execute() + p, res, err := client.ProjectsAPI.ListProject(context.Background(), string(organizationID)).Execute() if err != nil { return nil, err } @@ -261,7 +261,7 @@ func GetProjectById(id string) (*Project, error) { client := GetQoveryClient(tokenType, token) - project, res, err := client.ProjectMainCallsApi.GetProject(context.Background(), id).Execute() + project, res, err := client.ProjectMainCallsAPI.GetProject(context.Background(), id).Execute() if res.StatusCode >= 400 { return nil, errors.New("Received " + res.Status + " response while getting project " + id) } @@ -283,7 +283,7 @@ func SelectEnvironment(projectID Id) (*Environment, error) { client := GetQoveryClient(tokenType, token) - e, res, err := client.EnvironmentsApi.ListEnvironment(context.Background(), string(projectID)).Execute() + e, res, err := client.EnvironmentsAPI.ListEnvironment(context.Background(), string(projectID)).Execute() if err != nil { return nil, err } @@ -346,7 +346,7 @@ func GetEnvironmentById(id string) (*Environment, error) { client := GetQoveryClient(tokenType, token) - environment, res, err := client.EnvironmentMainCallsApi.GetEnvironment(context.Background(), id).Execute() + environment, res, err := client.EnvironmentMainCallsAPI.GetEnvironment(context.Background(), id).Execute() if res.StatusCode >= 400 { return nil, errors.New("Received " + res.Status + " response while getting environment " + id) } @@ -374,7 +374,7 @@ func GetEnvironmentServicesById(id string) ([]EnvironmentService, error) { client := GetQoveryClient(tokenType, token) - environmentServices, res, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), id).Execute() + environmentServices, res, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), id).Execute() if res.StatusCode >= 400 { return nil, errors.New("Received " + res.Status + " response while getting environment services" + id) } @@ -439,7 +439,7 @@ func SelectService(environment Id) (*Service, error) { client := GetQoveryClient(tokenType, token) - apps, res, err := client.ApplicationsApi.ListApplication(context.Background(), string(environment)).Execute() + apps, res, err := client.ApplicationsAPI.ListApplication(context.Background(), string(environment)).Execute() if err != nil { return nil, err } @@ -447,7 +447,7 @@ func SelectService(environment Id) (*Service, error) { return nil, errors.New("Received " + res.Status + " response while listing services. ") } - containers, res, err := client.ContainersApi.ListContainer(context.Background(), string(environment)).Execute() + containers, res, err := client.ContainersAPI.ListContainer(context.Background(), string(environment)).Execute() if err != nil { return nil, err } @@ -455,7 +455,7 @@ func SelectService(environment Id) (*Service, error) { return nil, errors.New("Received " + res.Status + " response while listing containers. ") } - databases, res, err := client.DatabasesApi.ListDatabase(context.Background(), string(environment)).Execute() + databases, res, err := client.DatabasesAPI.ListDatabase(context.Background(), string(environment)).Execute() if err != nil { return nil, err } @@ -463,7 +463,7 @@ func SelectService(environment Id) (*Service, error) { return nil, errors.New("Received " + res.Status + " response while listing containers. ") } - jobs, res, err := client.JobsApi.ListJobs(context.Background(), string(environment)).Execute() + jobs, res, err := client.JobsAPI.ListJobs(context.Background(), string(environment)).Execute() if err != nil { return nil, err } @@ -552,7 +552,7 @@ func GetApplicationById(id string) (*Application, error) { client := GetQoveryClient(tokenType, token) - application, res, err := client.ApplicationMainCallsApi.GetApplication(context.Background(), id).Execute() + application, res, err := client.ApplicationMainCallsAPI.GetApplication(context.Background(), id).Execute() if res.StatusCode >= 400 { return nil, errors.New("Received " + res.Status + " response while getting application " + id) } @@ -600,7 +600,7 @@ func GetContainerById(id string) (*Container, error) { client := GetQoveryClient(tokenType, token) - container, res, err := client.ContainerMainCallsApi.GetContainer(context.Background(), id).Execute() + container, res, err := client.ContainerMainCallsAPI.GetContainer(context.Background(), id).Execute() if res.StatusCode >= 400 { return nil, errors.New("Received " + res.Status + " response while getting container " + id) } @@ -627,7 +627,7 @@ func GetJobById(id string) (*Job, error) { client := GetQoveryClient(tokenType, token) - job, res, err := client.JobMainCallsApi.GetJob(context.Background(), id).Execute() + job, res, err := client.JobMainCallsAPI.GetJob(context.Background(), id).Execute() if res.StatusCode >= 400 { return nil, errors.New("Received " + res.Status + " response while getting job " + id) } @@ -658,7 +658,7 @@ func DeleteEnvironmentVariable(application Id, key string) error { client := GetQoveryClient(tokenType, token) // TODO optimize this call by caching the result? - envVars, _, err := client.ApplicationEnvironmentVariableApi.ListApplicationEnvironmentVariable(context.Background(), string(application)).Execute() + envVars, _, err := client.ApplicationEnvironmentVariableAPI.ListApplicationEnvironmentVariable(context.Background(), string(application)).Execute() if err != nil { return err @@ -676,7 +676,7 @@ func DeleteEnvironmentVariable(application Id, key string) error { return nil } - res, err := client.ApplicationEnvironmentVariableApi.DeleteApplicationEnvironmentVariable(context.Background(), string(application), envVar.Id).Execute() + res, err := client.ApplicationEnvironmentVariableAPI.DeleteApplicationEnvironmentVariable(context.Background(), string(application), envVar.Id).Execute() if err != nil { return err @@ -697,7 +697,7 @@ func AddEnvironmentVariable(application Id, key string, value string) error { client := GetQoveryClient(tokenType, token) - _, res, err := client.ApplicationEnvironmentVariableApi.CreateApplicationEnvironmentVariable(context.Background(), string(application)).EnvironmentVariableRequest( + _, res, err := client.ApplicationEnvironmentVariableAPI.CreateApplicationEnvironmentVariable(context.Background(), string(application)).EnvironmentVariableRequest( qovery.EnvironmentVariableRequest{Key: key, Value: &value}, ).Execute() @@ -721,7 +721,7 @@ func DeleteSecret(application Id, key string) error { client := GetQoveryClient(tokenType, token) // TODO optimize this call by caching the result? - secrets, _, err := client.ApplicationSecretApi.ListApplicationSecrets(context.Background(), string(application)).Execute() + secrets, _, err := client.ApplicationSecretAPI.ListApplicationSecrets(context.Background(), string(application)).Execute() if err != nil { return err @@ -739,7 +739,7 @@ func DeleteSecret(application Id, key string) error { return nil } - res, err := client.ApplicationSecretApi.DeleteApplicationSecret(context.Background(), string(application), secret.Id).Execute() + res, err := client.ApplicationSecretAPI.DeleteApplicationSecret(context.Background(), string(application), secret.Id).Execute() if err != nil { return err @@ -760,7 +760,7 @@ func AddSecret(application Id, key string, value string) error { client := GetQoveryClient(tokenType, token) - _, res, err := client.ApplicationSecretApi.CreateApplicationSecret(context.Background(), string(application)).SecretRequest( + _, res, err := client.ApplicationSecretAPI.CreateApplicationSecret(context.Background(), string(application)).SecretRequest( qovery.SecretRequest{Key: key, Value: &value}, ).Execute() @@ -1008,7 +1008,7 @@ func WatchEnvironment(envId string, finalServiceState qovery.StateEnum, client * func WatchEnvironmentWithOptions(envId string, finalServiceState qovery.StateEnum, client *qovery.APIClient, displaySimpleText bool) { for { - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { return @@ -1054,7 +1054,7 @@ func WatchEnvironmentWithOptions(envId string, finalServiceState qovery.StateEnu func WatchContainer(containerId string, envId string, client *qovery.APIClient) { out: for { - status, _, err := client.ContainerMainCallsApi.GetContainerStatus(context.Background(), containerId).Execute() + status, _, err := client.ContainerMainCallsAPI.GetContainerStatus(context.Background(), containerId).Execute() if err != nil { break @@ -1081,7 +1081,7 @@ out: func WatchApplication(applicationId string, envId string, client *qovery.APIClient) { out: for { - status, _, err := client.ApplicationMainCallsApi.GetApplicationStatus(context.Background(), applicationId).Execute() + status, _, err := client.ApplicationMainCallsAPI.GetApplicationStatus(context.Background(), applicationId).Execute() if err != nil { break @@ -1108,7 +1108,7 @@ out: func WatchDatabase(databaseId string, envId string, client *qovery.APIClient) { out: for { - status, _, err := client.DatabaseMainCallsApi.GetDatabaseStatus(context.Background(), databaseId).Execute() + status, _, err := client.DatabaseMainCallsAPI.GetDatabaseStatus(context.Background(), databaseId).Execute() if err != nil { break @@ -1135,7 +1135,7 @@ out: func WatchJob(jobId string, envId string, client *qovery.APIClient) { out: for { - status, _, err := client.JobMainCallsApi.GetJobStatus(context.Background(), jobId).Execute() + status, _, err := client.JobMainCallsAPI.GetJobStatus(context.Background(), jobId).Execute() if err != nil { break @@ -1197,7 +1197,7 @@ func countStatus(statuses []qovery.Status, state qovery.StateEnum) int { } func IsEnvironmentInATerminalState(envId string, client *qovery.APIClient) bool { - status, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatus(context.Background(), envId).Execute() + status, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatus(context.Background(), envId).Execute() if err != nil { return false @@ -1209,25 +1209,25 @@ func IsEnvironmentInATerminalState(envId string, client *qovery.APIClient) bool func GetServiceNameByIdAndType(client *qovery.APIClient, serviceId string, serviceType string) string { switch serviceType { case "APPLICATION": - application, _, err := client.ApplicationMainCallsApi.GetApplication(context.Background(), serviceId).Execute() + application, _, err := client.ApplicationMainCallsAPI.GetApplication(context.Background(), serviceId).Execute() if err != nil { return "" } return application.GetName() case "DATABASE": - database, _, err := client.DatabaseMainCallsApi.GetDatabase(context.Background(), serviceId).Execute() + database, _, err := client.DatabaseMainCallsAPI.GetDatabase(context.Background(), serviceId).Execute() if err != nil { return "" } return database.GetName() case "CONTAINER": - container, _, err := client.ContainerMainCallsApi.GetContainer(context.Background(), serviceId).Execute() + container, _, err := client.ContainerMainCallsAPI.GetContainer(context.Background(), serviceId).Execute() if err != nil { return "" } return container.GetName() case "JOB": - job, _, err := client.JobMainCallsApi.GetJob(context.Background(), serviceId).Execute() + job, _, err := client.JobMainCallsAPI.GetJob(context.Background(), serviceId).Execute() if err != nil { return "" } @@ -1238,7 +1238,7 @@ func GetServiceNameByIdAndType(client *qovery.APIClient, serviceId string, servi } func GetDeploymentStageId(client *qovery.APIClient, serviceId string) string { - sourceDeploymentStage, _, err := client.DeploymentStageMainCallsApi.GetServiceDeploymentStage(context.Background(), serviceId).Execute() + sourceDeploymentStage, _, err := client.DeploymentStageMainCallsAPI.GetServiceDeploymentStage(context.Background(), serviceId).Execute() if err != nil { PrintlnError(err) @@ -1256,7 +1256,7 @@ func DeployApplications(client *qovery.APIClient, envId string, applicationNames var applicationsToDeploy []qovery.DeployAllRequestApplicationsInner - applications, _, err := client.ApplicationsApi.ListApplication(context.Background(), envId).Execute() + applications, _, err := client.ApplicationsAPI.ListApplication(context.Background(), envId).Execute() if err != nil { return err @@ -1300,7 +1300,7 @@ func DeployContainers(client *qovery.APIClient, envId string, containerNames str var containersToDeploy []qovery.DeployAllRequestContainersInner - containers, _, err := client.ContainersApi.ListContainer(context.Background(), envId).Execute() + containers, _, err := client.ContainersAPI.ListContainer(context.Background(), envId).Execute() if err != nil { return err @@ -1344,7 +1344,7 @@ func DeployJobs(client *qovery.APIClient, envId string, jobNames string, commitI var jobsToDeploy []qovery.DeployAllRequestJobsInner - jobs, _, err := client.JobsApi.ListJobs(context.Background(), envId).Execute() + jobs, _, err := client.JobsAPI.ListJobs(context.Background(), envId).Execute() if err != nil { return err @@ -1358,8 +1358,8 @@ func DeployJobs(client *qovery.APIClient, envId string, jobNames string, commitI return fmt.Errorf("job %s not found", trimmedJobName) } - docker := job.Source.Docker.Get() - image := job.Source.Image.Get() + docker := job.Source.JobResponseAllOfSourceOneOf1.Docker + image := job.Source.JobResponseAllOfSourceOneOf.Image var mCommitId *string var mTag *string @@ -1371,7 +1371,7 @@ func DeployJobs(client *qovery.APIClient, envId string, jobNames string, commitI } } else { - mTag = image.Tag + mTag = &image.Tag if tag != "" { mTag = &tag @@ -1396,7 +1396,7 @@ func DeployJobs(client *qovery.APIClient, envId string, jobNames string, commitI } func deployAllServices(client *qovery.APIClient, envId string, req qovery.DeployAllRequest) error { - _, _, err := client.EnvironmentActionsApi.DeployAllServices(context.Background(), envId).DeployAllRequest(req).Execute() + _, _, err := client.EnvironmentActionsAPI.DeployAllServices(context.Background(), envId).DeployAllRequest(req).Execute() if err != nil { return err } @@ -1405,7 +1405,7 @@ func deployAllServices(client *qovery.APIClient, envId string, req qovery.Deploy } func CancelEnvironmentDeployment(client *qovery.APIClient, envId string, watchFlag bool) error { - _, _, err := client.EnvironmentActionsApi.CancelEnvironmentDeployment(context.Background(), envId).Execute() + _, _, err := client.EnvironmentActionsAPI.CancelEnvironmentDeployment(context.Background(), envId).Execute() if err != nil { return err @@ -1433,7 +1433,7 @@ func IsTerminalClusterState(state qovery.ClusterStateEnum) bool { } func CancelServiceDeployment(client *qovery.APIClient, envId string, serviceId string, serviceType ServiceType, watchFlag bool) (string, error) { - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { return "", err @@ -1503,7 +1503,7 @@ func CancelServiceDeployment(client *qovery.APIClient, envId string, serviceId s } func DeleteService(client *qovery.APIClient, envId string, serviceId string, serviceType ServiceType, watchFlag bool) (string, error) { - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { return "", err @@ -1514,7 +1514,7 @@ func DeleteService(client *qovery.APIClient, envId string, serviceId string, ser case ApplicationType: for _, application := range statuses.GetApplications() { if application.Id == serviceId && IsTerminalState(application.State) { - _, err := client.ApplicationMainCallsApi.DeleteApplication(context.Background(), serviceId).Execute() + _, err := client.ApplicationMainCallsAPI.DeleteApplication(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -1529,7 +1529,7 @@ func DeleteService(client *qovery.APIClient, envId string, serviceId string, ser case DatabaseType: for _, database := range statuses.GetDatabases() { if database.Id == serviceId && IsTerminalState(database.State) { - _, err := client.DatabaseMainCallsApi.DeleteDatabase(context.Background(), serviceId).Execute() + _, err := client.DatabaseMainCallsAPI.DeleteDatabase(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -1544,7 +1544,7 @@ func DeleteService(client *qovery.APIClient, envId string, serviceId string, ser case ContainerType: for _, container := range statuses.GetContainers() { if container.Id == serviceId && IsTerminalState(container.State) { - _, err := client.ContainerMainCallsApi.DeleteContainer(context.Background(), serviceId).Execute() + _, err := client.ContainerMainCallsAPI.DeleteContainer(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -1559,7 +1559,7 @@ func DeleteService(client *qovery.APIClient, envId string, serviceId string, ser case JobType: for _, job := range statuses.GetJobs() { if job.Id == serviceId && IsTerminalState(job.State) { - _, err := client.JobMainCallsApi.DeleteJob(context.Background(), serviceId).Execute() + _, err := client.JobMainCallsAPI.DeleteJob(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -1583,7 +1583,7 @@ func DeleteService(client *qovery.APIClient, envId string, serviceId string, ser } func DeleteServices(client *qovery.APIClient, envId string, serviceIds []string, serviceType ServiceType) (string, error) { - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { return "", err @@ -1604,7 +1604,7 @@ func DeleteServices(client *qovery.APIClient, envId string, serviceIds []string, } } if !cannotDelete { - _, err := client.EnvironmentActionsApi. + _, err := client.EnvironmentActionsAPI. DeleteSelectedServices(context.Background(), envId). EnvironmentServiceIdsAllRequest(qovery.EnvironmentServiceIdsAllRequest{ ApplicationIds: serviceIds, @@ -1623,7 +1623,7 @@ func DeleteServices(client *qovery.APIClient, envId string, serviceIds []string, } } if !cannotDelete { - _, err := client.EnvironmentActionsApi. + _, err := client.EnvironmentActionsAPI. DeleteSelectedServices(context.Background(), envId). EnvironmentServiceIdsAllRequest(qovery.EnvironmentServiceIdsAllRequest{ DatabaseIds: serviceIds, @@ -1642,7 +1642,7 @@ func DeleteServices(client *qovery.APIClient, envId string, serviceIds []string, } } if !cannotDelete { - _, err := client.EnvironmentActionsApi. + _, err := client.EnvironmentActionsAPI. DeleteSelectedServices(context.Background(), envId). EnvironmentServiceIdsAllRequest(qovery.EnvironmentServiceIdsAllRequest{ ContainerIds: serviceIds, @@ -1661,7 +1661,7 @@ func DeleteServices(client *qovery.APIClient, envId string, serviceIds []string, } } if !cannotDelete { - _, err := client.EnvironmentActionsApi. + _, err := client.EnvironmentActionsAPI. DeleteSelectedServices(context.Background(), envId). EnvironmentServiceIdsAllRequest(qovery.EnvironmentServiceIdsAllRequest{ JobIds: serviceIds, @@ -1685,7 +1685,7 @@ func DeleteServices(client *qovery.APIClient, envId string, serviceIds []string, } func DeployService(client *qovery.APIClient, envId string, serviceId string, serviceType ServiceType, request interface{}, watchFlag bool) (string, error) { - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { return "", err @@ -1697,7 +1697,7 @@ func DeployService(client *qovery.APIClient, envId string, serviceId string, ser for _, application := range statuses.GetApplications() { if application.Id == serviceId && IsTerminalState(application.State) { req := request.(qovery.DeployRequest) - _, _, err := client.ApplicationActionsApi.DeployApplication(context.Background(), serviceId).DeployRequest(req).Execute() + _, _, err := client.ApplicationActionsAPI.DeployApplication(context.Background(), serviceId).DeployRequest(req).Execute() if err != nil { return "", err } @@ -1714,7 +1714,7 @@ func DeployService(client *qovery.APIClient, envId string, serviceId string, ser case DatabaseType: for _, database := range statuses.GetDatabases() { if database.Id == serviceId && IsTerminalState(database.State) { - _, _, err := client.DatabaseActionsApi.DeployDatabase(context.Background(), serviceId).Execute() + _, _, err := client.DatabaseActionsAPI.DeployDatabase(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -1730,7 +1730,7 @@ func DeployService(client *qovery.APIClient, envId string, serviceId string, ser for _, container := range statuses.GetContainers() { if container.Id == serviceId && IsTerminalState(container.State) { req := request.(qovery.ContainerDeployRequest) - _, _, err := client.ContainerActionsApi.DeployContainer(context.Background(), serviceId).ContainerDeployRequest(req).Execute() + _, _, err := client.ContainerActionsAPI.DeployContainer(context.Background(), serviceId).ContainerDeployRequest(req).Execute() if err != nil { return "", err } @@ -1746,7 +1746,7 @@ func DeployService(client *qovery.APIClient, envId string, serviceId string, ser for _, job := range statuses.GetJobs() { if job.Id == serviceId && IsTerminalState(job.State) { req := request.(qovery.JobDeployRequest) - _, _, err := client.JobActionsApi.DeployJob(context.Background(), serviceId).JobDeployRequest(req).Execute() + _, _, err := client.JobActionsAPI.DeployJob(context.Background(), serviceId).JobDeployRequest(req).Execute() if err != nil { return "", err } @@ -1770,7 +1770,7 @@ func DeployService(client *qovery.APIClient, envId string, serviceId string, ser } func RedeployService(client *qovery.APIClient, envId string, serviceId string, serviceType ServiceType, watchFlag bool) (string, error) { - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { return "", err @@ -1781,7 +1781,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s case ApplicationType: for _, application := range statuses.GetApplications() { if application.Id == serviceId && IsTerminalState(application.State) { - _, _, err := client.ApplicationActionsApi.RedeployApplication(context.Background(), serviceId).Execute() + _, _, err := client.ApplicationActionsAPI.RedeployApplication(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -1796,7 +1796,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s case DatabaseType: for _, database := range statuses.GetDatabases() { if database.Id == serviceId && IsTerminalState(database.State) { - _, _, err := client.DatabaseActionsApi.RedeployDatabase(context.Background(), serviceId).Execute() + _, _, err := client.DatabaseActionsAPI.RedeployDatabase(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -1811,7 +1811,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s case ContainerType: for _, container := range statuses.GetContainers() { if container.Id == serviceId && IsTerminalState(container.State) { - _, _, err := client.ContainerActionsApi.RedeployContainer(context.Background(), serviceId).Execute() + _, _, err := client.ContainerActionsAPI.RedeployContainer(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -1826,7 +1826,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s case JobType: for _, job := range statuses.GetJobs() { if job.Id == serviceId && IsTerminalState(job.State) { - _, _, err := client.JobActionsApi.RedeployJob(context.Background(), serviceId).Execute() + _, _, err := client.JobActionsAPI.RedeployJob(context.Background(), serviceId).Execute() if err != nil { return "", err } @@ -1850,7 +1850,7 @@ func RedeployService(client *qovery.APIClient, envId string, serviceId string, s } func StopService(client *qovery.APIClient, envId string, serviceIds string, serviceType ServiceType, watchFlag bool) (string, error) { - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { return "", err @@ -1861,7 +1861,7 @@ func StopService(client *qovery.APIClient, envId string, serviceIds string, serv case ApplicationType: for _, application := range statuses.GetApplications() { if application.Id == serviceIds && IsTerminalState(application.State) { - _, _, err := client.ApplicationActionsApi.StopApplication(context.Background(), serviceIds).Execute() + _, _, err := client.ApplicationActionsAPI.StopApplication(context.Background(), serviceIds).Execute() if err != nil { return "", err } @@ -1876,7 +1876,7 @@ func StopService(client *qovery.APIClient, envId string, serviceIds string, serv case DatabaseType: for _, database := range statuses.GetDatabases() { if database.Id == serviceIds && IsTerminalState(database.State) { - _, _, err := client.DatabaseActionsApi.StopDatabase(context.Background(), serviceIds).Execute() + _, _, err := client.DatabaseActionsAPI.StopDatabase(context.Background(), serviceIds).Execute() if err != nil { return "", err } @@ -1891,7 +1891,7 @@ func StopService(client *qovery.APIClient, envId string, serviceIds string, serv case ContainerType: for _, container := range statuses.GetContainers() { if container.Id == serviceIds && IsTerminalState(container.State) { - _, _, err := client.ContainerActionsApi.StopContainer(context.Background(), serviceIds).Execute() + _, _, err := client.ContainerActionsAPI.StopContainer(context.Background(), serviceIds).Execute() if err != nil { return "", err } @@ -1906,7 +1906,7 @@ func StopService(client *qovery.APIClient, envId string, serviceIds string, serv case JobType: for _, job := range statuses.GetJobs() { if job.Id == serviceIds && IsTerminalState(job.State) { - _, _, err := client.JobActionsApi.StopJob(context.Background(), serviceIds).Execute() + _, _, err := client.JobActionsAPI.StopJob(context.Background(), serviceIds).Execute() if err != nil { return "", err } @@ -1930,7 +1930,7 @@ func StopService(client *qovery.APIClient, envId string, serviceIds string, serv } func StopServices(client *qovery.APIClient, envId string, serviceIds []string, serviceType ServiceType) (string, error) { - statuses, _, err := client.EnvironmentMainCallsApi.GetEnvironmentStatuses(context.Background(), envId).Execute() + statuses, _, err := client.EnvironmentMainCallsAPI.GetEnvironmentStatuses(context.Background(), envId).Execute() if err != nil { return "", err @@ -1951,7 +1951,7 @@ func StopServices(client *qovery.APIClient, envId string, serviceIds []string, s } } if !cannotStop { - _, err := client.EnvironmentActionsApi. + _, err := client.EnvironmentActionsAPI. StopSelectedServices(context.Background(), envId). EnvironmentServiceIdsAllRequest(qovery.EnvironmentServiceIdsAllRequest{ ApplicationIds: serviceIds, @@ -1970,7 +1970,7 @@ func StopServices(client *qovery.APIClient, envId string, serviceIds []string, s } } if !cannotStop { - _, err := client.EnvironmentActionsApi. + _, err := client.EnvironmentActionsAPI. StopSelectedServices(context.Background(), envId). EnvironmentServiceIdsAllRequest(qovery.EnvironmentServiceIdsAllRequest{ DatabaseIds: serviceIds, @@ -1989,7 +1989,7 @@ func StopServices(client *qovery.APIClient, envId string, serviceIds []string, s } } if !cannotStop { - _, err := client.EnvironmentActionsApi. + _, err := client.EnvironmentActionsAPI. StopSelectedServices(context.Background(), envId). EnvironmentServiceIdsAllRequest(qovery.EnvironmentServiceIdsAllRequest{ ContainerIds: serviceIds, @@ -2008,7 +2008,7 @@ func StopServices(client *qovery.APIClient, envId string, serviceIds []string, s } } if !cannotStop { - _, err := client.EnvironmentActionsApi. + _, err := client.EnvironmentActionsAPI. StopSelectedServices(context.Background(), envId). EnvironmentServiceIdsAllRequest(qovery.EnvironmentServiceIdsAllRequest{ JobIds: serviceIds, @@ -2032,15 +2032,15 @@ func StopServices(client *qovery.APIClient, envId string, serviceIds []string, s } func ToJobRequest(job qovery.JobResponse) qovery.JobRequest { - docker := job.Source.Docker.Get() - image := job.Source.Image.Get() + docker := job.Source.JobResponseAllOfSourceOneOf1.Docker + image := job.Source.JobResponseAllOfSourceOneOf.Image var sourceImage qovery.JobRequestAllOfSourceImage if image != nil { sourceImage = qovery.JobRequestAllOfSourceImage{ - ImageName: image.ImageName, - Tag: image.Tag, + ImageName: &image.ImageName, + Tag: &image.Tag, RegistryId: image.RegistryId, } }