Skip to content

Commit

Permalink
chore: adapt to the changment of the name generated by the open api
Browse files Browse the repository at this point in the history
  • Loading branch information
pggb25 committed Oct 12, 2023
1 parent a2c041e commit 8a48b47
Show file tree
Hide file tree
Showing 88 changed files with 293 additions and 291 deletions.
2 changes: 1 addition & 1 deletion cmd/application_cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/application_clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/application_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/application_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions cmd/application_domain_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions cmd/application_domain_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions cmd/application_domain_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions cmd/application_domain_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -53,15 +53,15 @@ 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)
os.Exit(1)
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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/application_env_alias_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/application_env_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/application_env_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions cmd/application_env_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion cmd/application_env_override_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions cmd/application_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ 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)
os.Exit(1)
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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/application_redeploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions cmd/application_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions cmd/application_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions cmd/cluster_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cluster_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions cmd/cluster_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/container_cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/container_clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/container_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/container_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 8a48b47

Please sign in to comment.