From 61b22e6b078a3c45f36bce9b9f6077ad480b797e Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 27 Dec 2022 13:31:49 +0100 Subject: [PATCH] Improve argus generated client (#72) * regenerate clients with v0.5.0 Co-authored-by: Dean Oren --- pkg/services/argus/v1.0/config.yaml | 14 +- pkg/services/argus/v1.0/generated/acl/acl.go | 2 +- .../generated/alert-config/alert-config.go | 2 +- .../generated/alert-groups/alert-groups.go | 2 +- .../generated/alert-records/alert-records.go | 2 +- .../v1.0/generated/alert-rules/alert-rules.go | 2 +- .../argus/v1.0/generated/argus.gen.go | 90 +++++------ .../argus/v1.0/generated/backup/backup.go | 34 ++-- .../v1.0/generated/cert-check/cert-check.go | 2 +- .../grafana-configs/grafana-configs.go | 2 +- .../v1.0/generated/http-check/http-check.go | 2 +- .../v1.0/generated/instances/instances.go | 38 ++--- .../argus/v1.0/generated/instances/wait.go | 145 +++++++++++++++++ .../argus/v1.0/generated/logs/logs.go | 2 +- .../metrics-storage-retention.go | 2 +- .../generated/network-check/network-check.go | 2 +- .../v1.0/generated/ping-check/ping-check.go | 2 +- .../argus/v1.0/generated/plans/plans.go | 2 +- .../generated/scrape-config/scrape-config.go | 74 ++++----- pkg/services/argus/v1.0/generated/service.go | 5 +- .../argus/v1.0/generated/traces/traces.go | 2 +- .../argus/v1.0/include/instances/common.go | 15 ++ .../argus/v1.0/include/instances/wait.go | 146 ++++++++++++++++++ pkg/services/argus/v1.0/include/service.go | 5 +- pkg/services/data-services/v1.0/config.yaml | 8 +- .../v1.0/generated/credentials/credentials.go | 2 +- .../v1.0/generated/dataservices.gen.go | 2 +- .../v1.0/generated/instances/instances.go | 2 +- .../v1.0/generated/offerings/offerings.go | 2 +- pkg/services/kubernetes/v1.0/config.yaml | 16 +- .../v1.0/generated/cluster/cluster.go | 2 +- .../v1.0/generated/credentials/credentials.go | 2 +- .../v1.0/generated/kubernetes.gen.go | 2 +- .../v1.0/generated/operation/operation.go | 2 +- .../v1.0/generated/project/project.go | 2 +- .../provider-options/provider-options.go | 2 +- pkg/services/mongodb-flex/v1.0/config.yaml | 8 +- .../v1.0/generated/backup/backup.go | 2 +- .../v1.0/generated/flavors/flavors.go | 2 +- .../v1.0/generated/instance/instance.go | 2 +- .../v1.0/generated/instance/wait.go | 4 +- .../v1.0/generated/mongodbflex.gen.go | 2 +- .../v1.0/generated/storage/storage.go | 2 +- .../mongodb-flex/v1.0/generated/user/user.go | 2 +- .../v1.0/generated/versions/versions.go | 2 +- pkg/services/postgres-flex/v1.0/config.yaml | 8 +- .../v1.0/generated/backups/backups.go | 2 +- .../v1.0/generated/flavors/flavors.go | 2 +- .../v1.0/generated/instance/instance.go | 2 +- .../v1.0/generated/postgresflex.gen.go | 2 +- .../v1.0/generated/storage/storage.go | 2 +- .../v1.0/generated/users/users.go | 2 +- .../v1.0/generated/versions/versions.go | 2 +- 53 files changed, 509 insertions(+), 177 deletions(-) create mode 100644 pkg/services/argus/v1.0/generated/instances/wait.go create mode 100644 pkg/services/argus/v1.0/include/instances/common.go create mode 100644 pkg/services/argus/v1.0/include/instances/wait.go diff --git a/pkg/services/argus/v1.0/config.yaml b/pkg/services/argus/v1.0/config.yaml index 6a77edbb..8b352c5a 100644 --- a/pkg/services/argus/v1.0/config.yaml +++ b/pkg/services/argus/v1.0/config.yaml @@ -39,7 +39,19 @@ output-options: copy: - from: include/service.go to: service.go - trim: "argus." + tidy: + - replace: "*argus." + with: "*" + all: true + - replace: " argus." + with: " " + all: true + - from: include/instances/wait.go + to: instances/wait.go + tidy: + - replace: "instances." + with: + all: true tidy: verbose: false functions: diff --git a/pkg/services/argus/v1.0/generated/acl/acl.go b/pkg/services/argus/v1.0/generated/acl/acl.go index 9465d025..2536dc66 100644 --- a/pkg/services/argus/v1.0/generated/acl/acl.go +++ b/pkg/services/argus/v1.0/generated/acl/acl.go @@ -1,6 +1,6 @@ // Package acl provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package acl import ( diff --git a/pkg/services/argus/v1.0/generated/alert-config/alert-config.go b/pkg/services/argus/v1.0/generated/alert-config/alert-config.go index b26001d1..a5cccbb6 100644 --- a/pkg/services/argus/v1.0/generated/alert-config/alert-config.go +++ b/pkg/services/argus/v1.0/generated/alert-config/alert-config.go @@ -1,6 +1,6 @@ // Package alertconfig provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package alertconfig import ( diff --git a/pkg/services/argus/v1.0/generated/alert-groups/alert-groups.go b/pkg/services/argus/v1.0/generated/alert-groups/alert-groups.go index 855fdd19..2a8c1bde 100644 --- a/pkg/services/argus/v1.0/generated/alert-groups/alert-groups.go +++ b/pkg/services/argus/v1.0/generated/alert-groups/alert-groups.go @@ -1,6 +1,6 @@ // Package alertgroups provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package alertgroups import ( diff --git a/pkg/services/argus/v1.0/generated/alert-records/alert-records.go b/pkg/services/argus/v1.0/generated/alert-records/alert-records.go index 96a0a7d1..a87793fd 100644 --- a/pkg/services/argus/v1.0/generated/alert-records/alert-records.go +++ b/pkg/services/argus/v1.0/generated/alert-records/alert-records.go @@ -1,6 +1,6 @@ // Package alertrecords provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package alertrecords import ( diff --git a/pkg/services/argus/v1.0/generated/alert-rules/alert-rules.go b/pkg/services/argus/v1.0/generated/alert-rules/alert-rules.go index 801eec97..b6078d0e 100644 --- a/pkg/services/argus/v1.0/generated/alert-rules/alert-rules.go +++ b/pkg/services/argus/v1.0/generated/alert-rules/alert-rules.go @@ -1,6 +1,6 @@ // Package alertrules provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package alertrules import ( diff --git a/pkg/services/argus/v1.0/generated/argus.gen.go b/pkg/services/argus/v1.0/generated/argus.gen.go index 62c91fde..42347bbc 100644 --- a/pkg/services/argus/v1.0/generated/argus.gen.go +++ b/pkg/services/argus/v1.0/generated/argus.gen.go @@ -1,6 +1,6 @@ // Package argus provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package argus import ( @@ -32,19 +32,19 @@ type Client struct { // list of connected client services Instances *instances.Client Acl *acl.Client - Alertconfig *alertconfig.Client - Alertgroups *alertgroups.Client - Alertrules *alertrules.Client - Alertrecords *alertrecords.Client + AlertConfig *alertconfig.Client + AlertGroups *alertgroups.Client + AlertRules *alertrules.Client + AlertRecords *alertrecords.Client Backup *backup.Client - Certcheck *certcheck.Client - Grafanaconfigs *grafanaconfigs.Client - Httpcheck *httpcheck.Client + CertCheck *certcheck.Client + GrafanaConfigs *grafanaconfigs.Client + HttpCheck *httpcheck.Client Logs *logs.Client - Metricsstorageretention *metricsstorageretention.Client - Networkcheck *networkcheck.Client - Pingcheck *pingcheck.Client - Scrapeconfig *scrapeconfig.Client + MetricsStorageRetention *metricsstorageretention.Client + NetworkCheck *networkcheck.Client + PingCheck *pingcheck.Client + ScrapeConfig *scrapeconfig.Client Traces *traces.Client Plans *plans.Client @@ -80,19 +80,19 @@ func NewClient(server string, opts ...ClientOption) (*Client, error) { client.Instances = instances.NewClient(server, client.Client) client.Acl = acl.NewClient(server, client.Client) - client.Alertconfig = alertconfig.NewClient(server, client.Client) - client.Alertgroups = alertgroups.NewClient(server, client.Client) - client.Alertrules = alertrules.NewClient(server, client.Client) - client.Alertrecords = alertrecords.NewClient(server, client.Client) + client.AlertConfig = alertconfig.NewClient(server, client.Client) + client.AlertGroups = alertgroups.NewClient(server, client.Client) + client.AlertRules = alertrules.NewClient(server, client.Client) + client.AlertRecords = alertrecords.NewClient(server, client.Client) client.Backup = backup.NewClient(server, client.Client) - client.Certcheck = certcheck.NewClient(server, client.Client) - client.Grafanaconfigs = grafanaconfigs.NewClient(server, client.Client) - client.Httpcheck = httpcheck.NewClient(server, client.Client) + client.CertCheck = certcheck.NewClient(server, client.Client) + client.GrafanaConfigs = grafanaconfigs.NewClient(server, client.Client) + client.HttpCheck = httpcheck.NewClient(server, client.Client) client.Logs = logs.NewClient(server, client.Client) - client.Metricsstorageretention = metricsstorageretention.NewClient(server, client.Client) - client.Networkcheck = networkcheck.NewClient(server, client.Client) - client.Pingcheck = pingcheck.NewClient(server, client.Client) - client.Scrapeconfig = scrapeconfig.NewClient(server, client.Client) + client.MetricsStorageRetention = metricsstorageretention.NewClient(server, client.Client) + client.NetworkCheck = networkcheck.NewClient(server, client.Client) + client.PingCheck = pingcheck.NewClient(server, client.Client) + client.ScrapeConfig = scrapeconfig.NewClient(server, client.Client) client.Traces = traces.NewClient(server, client.Client) client.Plans = plans.NewClient(server, client.Client) @@ -127,19 +127,19 @@ type ClientWithResponses struct { // list of connected client services Instances *instances.ClientWithResponses Acl *acl.ClientWithResponses - Alertconfig *alertconfig.ClientWithResponses - Alertgroups *alertgroups.ClientWithResponses - Alertrules *alertrules.ClientWithResponses - Alertrecords *alertrecords.ClientWithResponses + AlertConfig *alertconfig.ClientWithResponses + AlertGroups *alertgroups.ClientWithResponses + AlertRules *alertrules.ClientWithResponses + AlertRecords *alertrecords.ClientWithResponses Backup *backup.ClientWithResponses - Certcheck *certcheck.ClientWithResponses - Grafanaconfigs *grafanaconfigs.ClientWithResponses - Httpcheck *httpcheck.ClientWithResponses + CertCheck *certcheck.ClientWithResponses + GrafanaConfigs *grafanaconfigs.ClientWithResponses + HttpCheck *httpcheck.ClientWithResponses Logs *logs.ClientWithResponses - Metricsstorageretention *metricsstorageretention.ClientWithResponses - Networkcheck *networkcheck.ClientWithResponses - Pingcheck *pingcheck.ClientWithResponses - Scrapeconfig *scrapeconfig.ClientWithResponses + MetricsStorageRetention *metricsstorageretention.ClientWithResponses + NetworkCheck *networkcheck.ClientWithResponses + PingCheck *pingcheck.ClientWithResponses + ScrapeConfig *scrapeconfig.ClientWithResponses Traces *traces.ClientWithResponses Plans *plans.ClientWithResponses } @@ -155,19 +155,19 @@ func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithRes cwr := &ClientWithResponses{Client: client} cwr.Instances = instances.NewClientWithResponses(server, client.Client) cwr.Acl = acl.NewClientWithResponses(server, client.Client) - cwr.Alertconfig = alertconfig.NewClientWithResponses(server, client.Client) - cwr.Alertgroups = alertgroups.NewClientWithResponses(server, client.Client) - cwr.Alertrules = alertrules.NewClientWithResponses(server, client.Client) - cwr.Alertrecords = alertrecords.NewClientWithResponses(server, client.Client) + cwr.AlertConfig = alertconfig.NewClientWithResponses(server, client.Client) + cwr.AlertGroups = alertgroups.NewClientWithResponses(server, client.Client) + cwr.AlertRules = alertrules.NewClientWithResponses(server, client.Client) + cwr.AlertRecords = alertrecords.NewClientWithResponses(server, client.Client) cwr.Backup = backup.NewClientWithResponses(server, client.Client) - cwr.Certcheck = certcheck.NewClientWithResponses(server, client.Client) - cwr.Grafanaconfigs = grafanaconfigs.NewClientWithResponses(server, client.Client) - cwr.Httpcheck = httpcheck.NewClientWithResponses(server, client.Client) + cwr.CertCheck = certcheck.NewClientWithResponses(server, client.Client) + cwr.GrafanaConfigs = grafanaconfigs.NewClientWithResponses(server, client.Client) + cwr.HttpCheck = httpcheck.NewClientWithResponses(server, client.Client) cwr.Logs = logs.NewClientWithResponses(server, client.Client) - cwr.Metricsstorageretention = metricsstorageretention.NewClientWithResponses(server, client.Client) - cwr.Networkcheck = networkcheck.NewClientWithResponses(server, client.Client) - cwr.Pingcheck = pingcheck.NewClientWithResponses(server, client.Client) - cwr.Scrapeconfig = scrapeconfig.NewClientWithResponses(server, client.Client) + cwr.MetricsStorageRetention = metricsstorageretention.NewClientWithResponses(server, client.Client) + cwr.NetworkCheck = networkcheck.NewClientWithResponses(server, client.Client) + cwr.PingCheck = pingcheck.NewClientWithResponses(server, client.Client) + cwr.ScrapeConfig = scrapeconfig.NewClientWithResponses(server, client.Client) cwr.Traces = traces.NewClientWithResponses(server, client.Client) cwr.Plans = plans.NewClientWithResponses(server, client.Client) diff --git a/pkg/services/argus/v1.0/generated/backup/backup.go b/pkg/services/argus/v1.0/generated/backup/backup.go index b6b9145b..0516a4b3 100644 --- a/pkg/services/argus/v1.0/generated/backup/backup.go +++ b/pkg/services/argus/v1.0/generated/backup/backup.go @@ -1,6 +1,6 @@ // Package backup provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package backup import ( @@ -25,34 +25,34 @@ const ( // Defines values for RestoresCreateParamsRestoreTarget. const ( - RestoresCreateParamsRestoreTargetALERT_CONFIG RestoresCreateParamsRestoreTarget = "alertConfig" - RestoresCreateParamsRestoreTargetALERT_RULES RestoresCreateParamsRestoreTarget = "alertRules" - RestoresCreateParamsRestoreTargetGRAFANA RestoresCreateParamsRestoreTarget = "grafana" - RestoresCreateParamsRestoreTargetSCRAPE_CONFIG RestoresCreateParamsRestoreTarget = "scrapeConfig" + RESTORES_CREATE_PARAMS_RESTORE_TARGET_ALERT_CONFIG RestoresCreateParamsRestoreTarget = "alertConfig" + RESTORES_CREATE_PARAMS_RESTORE_TARGET_ALERT_RULES RestoresCreateParamsRestoreTarget = "alertRules" + RESTORES_CREATE_PARAMS_RESTORE_TARGET_GRAFANA RestoresCreateParamsRestoreTarget = "grafana" + RESTORES_CREATE_PARAMS_RESTORE_TARGET_SCRAPE_CONFIG RestoresCreateParamsRestoreTarget = "scrapeConfig" ) // Defines values for SchedulesListParamsBackupTarget. const ( - SchedulesListParamsBackupTargetALERT_CONFIG SchedulesListParamsBackupTarget = "alertConfig" - SchedulesListParamsBackupTargetALERT_RULES SchedulesListParamsBackupTarget = "alertRules" - SchedulesListParamsBackupTargetGRAFANA SchedulesListParamsBackupTarget = "grafana" - SchedulesListParamsBackupTargetSCRAPE_CONFIG SchedulesListParamsBackupTarget = "scrapeConfig" + SCHEDULES_LIST_PARAMS_BACKUP_TARGET_ALERT_CONFIG SchedulesListParamsBackupTarget = "alertConfig" + SCHEDULES_LIST_PARAMS_BACKUP_TARGET_ALERT_RULES SchedulesListParamsBackupTarget = "alertRules" + SCHEDULES_LIST_PARAMS_BACKUP_TARGET_GRAFANA SchedulesListParamsBackupTarget = "grafana" + SCHEDULES_LIST_PARAMS_BACKUP_TARGET_SCRAPE_CONFIG SchedulesListParamsBackupTarget = "scrapeConfig" ) // Defines values for SchedulesCreateParamsBackupTarget. const ( - SchedulesCreateParamsBackupTargetALERT_CONFIG SchedulesCreateParamsBackupTarget = "alertConfig" - SchedulesCreateParamsBackupTargetALERT_RULES SchedulesCreateParamsBackupTarget = "alertRules" - SchedulesCreateParamsBackupTargetGRAFANA SchedulesCreateParamsBackupTarget = "grafana" - SchedulesCreateParamsBackupTargetSCRAPE_CONFIG SchedulesCreateParamsBackupTarget = "scrapeConfig" + SCHEDULES_CREATE_PARAMS_BACKUP_TARGET_ALERT_CONFIG SchedulesCreateParamsBackupTarget = "alertConfig" + SCHEDULES_CREATE_PARAMS_BACKUP_TARGET_ALERT_RULES SchedulesCreateParamsBackupTarget = "alertRules" + SCHEDULES_CREATE_PARAMS_BACKUP_TARGET_GRAFANA SchedulesCreateParamsBackupTarget = "grafana" + SCHEDULES_CREATE_PARAMS_BACKUP_TARGET_SCRAPE_CONFIG SchedulesCreateParamsBackupTarget = "scrapeConfig" ) // Defines values for ListParamsBackupTarget. const ( - ListParamsBackupTargetALERT_CONFIG ListParamsBackupTarget = "alertConfig" - ListParamsBackupTargetALERT_RULES ListParamsBackupTarget = "alertRules" - ListParamsBackupTargetGRAFANA ListParamsBackupTarget = "grafana" - ListParamsBackupTargetSCRAPE_CONFIG ListParamsBackupTarget = "scrapeConfig" + LIST_PARAMS_BACKUP_TARGET_ALERT_CONFIG ListParamsBackupTarget = "alertConfig" + LIST_PARAMS_BACKUP_TARGET_ALERT_RULES ListParamsBackupTarget = "alertRules" + LIST_PARAMS_BACKUP_TARGET_GRAFANA ListParamsBackupTarget = "grafana" + LIST_PARAMS_BACKUP_TARGET_SCRAPE_CONFIG ListParamsBackupTarget = "scrapeConfig" ) // Defines values for CreateParamsBackupTarget. diff --git a/pkg/services/argus/v1.0/generated/cert-check/cert-check.go b/pkg/services/argus/v1.0/generated/cert-check/cert-check.go index 1f91a3eb..ba3363e1 100644 --- a/pkg/services/argus/v1.0/generated/cert-check/cert-check.go +++ b/pkg/services/argus/v1.0/generated/cert-check/cert-check.go @@ -1,6 +1,6 @@ // Package certcheck provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package certcheck import ( diff --git a/pkg/services/argus/v1.0/generated/grafana-configs/grafana-configs.go b/pkg/services/argus/v1.0/generated/grafana-configs/grafana-configs.go index 8a18b511..a7c06c76 100644 --- a/pkg/services/argus/v1.0/generated/grafana-configs/grafana-configs.go +++ b/pkg/services/argus/v1.0/generated/grafana-configs/grafana-configs.go @@ -1,6 +1,6 @@ // Package grafanaconfigs provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package grafanaconfigs import ( diff --git a/pkg/services/argus/v1.0/generated/http-check/http-check.go b/pkg/services/argus/v1.0/generated/http-check/http-check.go index 85877bc7..1371f72e 100644 --- a/pkg/services/argus/v1.0/generated/http-check/http-check.go +++ b/pkg/services/argus/v1.0/generated/http-check/http-check.go @@ -1,6 +1,6 @@ // Package httpcheck provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package httpcheck import ( diff --git a/pkg/services/argus/v1.0/generated/instances/instances.go b/pkg/services/argus/v1.0/generated/instances/instances.go index 937d805c..2358c508 100644 --- a/pkg/services/argus/v1.0/generated/instances/instances.go +++ b/pkg/services/argus/v1.0/generated/instances/instances.go @@ -1,6 +1,6 @@ // Package instances provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package instances import ( @@ -25,28 +25,28 @@ const ( // Defines values for ProjectInstanceFullStatus. const ( - ProjectInstanceFullStatusCREATE_FAILED ProjectInstanceFullStatus = "CREATE_FAILED" - ProjectInstanceFullStatusCREATE_SUCCEEDED ProjectInstanceFullStatus = "CREATE_SUCCEEDED" - ProjectInstanceFullStatusCREATING ProjectInstanceFullStatus = "CREATING" - ProjectInstanceFullStatusDELETE_FAILED ProjectInstanceFullStatus = "DELETE_FAILED" - ProjectInstanceFullStatusDELETE_SUCCEEDED ProjectInstanceFullStatus = "DELETE_SUCCEEDED" - ProjectInstanceFullStatusDELETING ProjectInstanceFullStatus = "DELETING" - ProjectInstanceFullStatusUPDATE_FAILED ProjectInstanceFullStatus = "UPDATE_FAILED" - ProjectInstanceFullStatusUPDATE_SUCCEEDED ProjectInstanceFullStatus = "UPDATE_SUCCEEDED" - ProjectInstanceFullStatusUPDATING ProjectInstanceFullStatus = "UPDATING" + PROJECT_INSTANCE_FULL_STATUS_CREATE_FAILED ProjectInstanceFullStatus = "CREATE_FAILED" + PROJECT_INSTANCE_FULL_STATUS_CREATE_SUCCEEDED ProjectInstanceFullStatus = "CREATE_SUCCEEDED" + PROJECT_INSTANCE_FULL_STATUS_CREATING ProjectInstanceFullStatus = "CREATING" + PROJECT_INSTANCE_FULL_STATUS_DELETE_FAILED ProjectInstanceFullStatus = "DELETE_FAILED" + PROJECT_INSTANCE_FULL_STATUS_DELETE_SUCCEEDED ProjectInstanceFullStatus = "DELETE_SUCCEEDED" + PROJECT_INSTANCE_FULL_STATUS_DELETING ProjectInstanceFullStatus = "DELETING" + PROJECT_INSTANCE_FULL_STATUS_UPDATE_FAILED ProjectInstanceFullStatus = "UPDATE_FAILED" + PROJECT_INSTANCE_FULL_STATUS_UPDATE_SUCCEEDED ProjectInstanceFullStatus = "UPDATE_SUCCEEDED" + PROJECT_INSTANCE_FULL_STATUS_UPDATING ProjectInstanceFullStatus = "UPDATING" ) // Defines values for ProjectInstanceUIStatus. const ( - ProjectInstanceUIStatusCREATE_FAILED ProjectInstanceUIStatus = "CREATE_FAILED" - ProjectInstanceUIStatusCREATE_SUCCEEDED ProjectInstanceUIStatus = "CREATE_SUCCEEDED" - ProjectInstanceUIStatusCREATING ProjectInstanceUIStatus = "CREATING" - ProjectInstanceUIStatusDELETE_FAILED ProjectInstanceUIStatus = "DELETE_FAILED" - ProjectInstanceUIStatusDELETE_SUCCEEDED ProjectInstanceUIStatus = "DELETE_SUCCEEDED" - ProjectInstanceUIStatusDELETING ProjectInstanceUIStatus = "DELETING" - ProjectInstanceUIStatusUPDATE_FAILED ProjectInstanceUIStatus = "UPDATE_FAILED" - ProjectInstanceUIStatusUPDATE_SUCCEEDED ProjectInstanceUIStatus = "UPDATE_SUCCEEDED" - ProjectInstanceUIStatusUPDATING ProjectInstanceUIStatus = "UPDATING" + PROJECT_INSTANCE_UI_STATUS_CREATE_FAILED ProjectInstanceUIStatus = "CREATE_FAILED" + PROJECT_INSTANCE_UI_STATUS_CREATE_SUCCEEDED ProjectInstanceUIStatus = "CREATE_SUCCEEDED" + PROJECT_INSTANCE_UI_STATUS_CREATING ProjectInstanceUIStatus = "CREATING" + PROJECT_INSTANCE_UI_STATUS_DELETE_FAILED ProjectInstanceUIStatus = "DELETE_FAILED" + PROJECT_INSTANCE_UI_STATUS_DELETE_SUCCEEDED ProjectInstanceUIStatus = "DELETE_SUCCEEDED" + PROJECT_INSTANCE_UI_STATUS_DELETING ProjectInstanceUIStatus = "DELETING" + PROJECT_INSTANCE_UI_STATUS_UPDATE_FAILED ProjectInstanceUIStatus = "UPDATE_FAILED" + PROJECT_INSTANCE_UI_STATUS_UPDATE_SUCCEEDED ProjectInstanceUIStatus = "UPDATE_SUCCEEDED" + PROJECT_INSTANCE_UI_STATUS_UPDATING ProjectInstanceUIStatus = "UPDATING" ) // APIUserCreated defines model for APIUserCreated. diff --git a/pkg/services/argus/v1.0/generated/instances/wait.go b/pkg/services/argus/v1.0/generated/instances/wait.go new file mode 100644 index 00000000..9b5300c2 --- /dev/null +++ b/pkg/services/argus/v1.0/generated/instances/wait.go @@ -0,0 +1,145 @@ +package instances + +import ( + "context" + "errors" + "fmt" + "net/http" + "strings" + "time" + + "github.com/SchwarzIT/community-stackit-go-client/pkg/wait" +) + +// WaitHandler will wait for instance creation +// returned interface is nil or *ProjectInstanceUI +func (r InstanceCreateResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, instanceID string) *wait.Handler { + return wait.New(func() (res interface{}, done bool, err error) { + s, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + return nil, false, err + } + if s.HasError != nil { + return nil, false, s.HasError + } + if s.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if s.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_CREATE_SUCCEEDED { + return s.JSON200, true, nil + } + return s.JSON200, false, nil + }) +} + +// WaitHandler will wait for instance update +// returned interface is nil or *ProjectInstanceUI +func (r InstanceUpdateResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, instanceID string) *wait.Handler { + return wait.New(func() (res interface{}, done bool, err error) { + s, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + return nil, false, err + } + if s.HasError != nil { + return nil, false, s.HasError + } + if s.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if s.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_UPDATE_SUCCEEDED { + return s.JSON200, true, nil + } + if s.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_UPDATE_FAILED { + return s.JSON200, true, fmt.Errorf("update failed for instance %s", instanceID) + } + if s.JSON200.Status != PROJECT_INSTANCE_UI_STATUS_UPDATING { + // in some cases it takes a long time for the server to change the + // instance status to UPDATING + // the following code will wait for the status change for 5 minutes + // and continue the outer wait on change or fail + w := wait.New(func() (res interface{}, done bool, err error) { + si, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + return nil, false, err + } + if s.HasError != nil { + return nil, false, s.HasError + } + if s.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if si.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_UPDATING || + si.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_UPDATE_SUCCEEDED || + si.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_UPDATE_FAILED { + return nil, true, nil + } + return nil, false, nil + }) + _, err := w.SetTimeout(5 * time.Minute).Wait() + return nil, false, err + } + return s.JSON200, false, nil + }) +} + +// WaitHandler will wait for instance deletion +// returned interface is nil +func (r InstanceDeleteResponse) WaitHandler(ctx context.Context, c *ClientWithResponses, projectID, instanceID string) *wait.Handler { + return wait.New(func() (res interface{}, done bool, err error) { + s, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + if strings.Contains(err.Error(), http.StatusText(http.StatusNotFound)) { + return nil, true, nil + } + return nil, false, err + } + if s.StatusCode() == http.StatusNotFound { + return nil, true, nil + } + if s.HasError != nil { + return nil, false, s.HasError + } + if s.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if s.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_DELETE_SUCCEEDED { + return nil, true, nil + } + if s.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_DELETE_FAILED { + return s.JSON200, true, fmt.Errorf("deletion failed for instance %s", instanceID) + } + if s.JSON200.Status != PROJECT_INSTANCE_UI_STATUS_DELETING { + // in some cases it takes a long time for the server to change the + // instance status to status DELETING + // the following code will wait for the status change for 5 minutes + // and continue the outer wait on change or fail + w := wait.New(func() (res interface{}, done bool, err error) { + si, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + if strings.Contains(err.Error(), http.StatusText(http.StatusNotFound)) { + return nil, true, nil + } + return nil, false, err + } + if si.StatusCode() == http.StatusNotFound { + return nil, true, nil + } + if si.HasError != nil { + return nil, false, s.HasError + } + if si.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if si.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_DELETING || + si.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_DELETE_FAILED || + si.JSON200.Status == PROJECT_INSTANCE_UI_STATUS_DELETE_SUCCEEDED { + return nil, true, nil + } + return nil, false, nil + }) + _, err := w.SetTimeout(5 * time.Minute).Wait() + return nil, false, err + } + return nil, false, nil + }) +} diff --git a/pkg/services/argus/v1.0/generated/logs/logs.go b/pkg/services/argus/v1.0/generated/logs/logs.go index 4d7266dc..b236b0b1 100644 --- a/pkg/services/argus/v1.0/generated/logs/logs.go +++ b/pkg/services/argus/v1.0/generated/logs/logs.go @@ -1,6 +1,6 @@ // Package logs provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package logs import ( diff --git a/pkg/services/argus/v1.0/generated/metrics-storage-retention/metrics-storage-retention.go b/pkg/services/argus/v1.0/generated/metrics-storage-retention/metrics-storage-retention.go index 992a0dc3..c16cc408 100644 --- a/pkg/services/argus/v1.0/generated/metrics-storage-retention/metrics-storage-retention.go +++ b/pkg/services/argus/v1.0/generated/metrics-storage-retention/metrics-storage-retention.go @@ -1,6 +1,6 @@ // Package metricsstorageretention provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package metricsstorageretention import ( diff --git a/pkg/services/argus/v1.0/generated/network-check/network-check.go b/pkg/services/argus/v1.0/generated/network-check/network-check.go index de4ea3fb..65f01208 100644 --- a/pkg/services/argus/v1.0/generated/network-check/network-check.go +++ b/pkg/services/argus/v1.0/generated/network-check/network-check.go @@ -1,6 +1,6 @@ // Package networkcheck provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package networkcheck import ( diff --git a/pkg/services/argus/v1.0/generated/ping-check/ping-check.go b/pkg/services/argus/v1.0/generated/ping-check/ping-check.go index 707b9e40..80f51a4a 100644 --- a/pkg/services/argus/v1.0/generated/ping-check/ping-check.go +++ b/pkg/services/argus/v1.0/generated/ping-check/ping-check.go @@ -1,6 +1,6 @@ // Package pingcheck provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package pingcheck import ( diff --git a/pkg/services/argus/v1.0/generated/plans/plans.go b/pkg/services/argus/v1.0/generated/plans/plans.go index 08f4fafe..5382de93 100644 --- a/pkg/services/argus/v1.0/generated/plans/plans.go +++ b/pkg/services/argus/v1.0/generated/plans/plans.go @@ -1,6 +1,6 @@ // Package plans provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package plans import ( diff --git a/pkg/services/argus/v1.0/generated/scrape-config/scrape-config.go b/pkg/services/argus/v1.0/generated/scrape-config/scrape-config.go index 782514d1..77ae0fdc 100644 --- a/pkg/services/argus/v1.0/generated/scrape-config/scrape-config.go +++ b/pkg/services/argus/v1.0/generated/scrape-config/scrape-config.go @@ -1,6 +1,6 @@ // Package scrapeconfig provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package scrapeconfig import ( @@ -24,70 +24,70 @@ const ( // Defines values for JobScheme. const ( - JobSchemeHTTP JobScheme = "http" - JobSchemeHTTPS JobScheme = "https" + JOB_SCHEME_HTTP JobScheme = "http" + JOB_SCHEME_HTTPS JobScheme = "https" ) // Defines values for MetricsRelabelConfigAction. const ( - MetricsRelabelConfigActionDROP MetricsRelabelConfigAction = "drop" - MetricsRelabelConfigActionHASHMOD MetricsRelabelConfigAction = "hashmod" - MetricsRelabelConfigActionKEEP MetricsRelabelConfigAction = "keep" - MetricsRelabelConfigActionLABELDROP MetricsRelabelConfigAction = "labeldrop" - MetricsRelabelConfigActionLABELKEEP MetricsRelabelConfigAction = "labelkeep" - MetricsRelabelConfigActionLABELMAP MetricsRelabelConfigAction = "labelmap" - MetricsRelabelConfigActionREPLACE MetricsRelabelConfigAction = "replace" + METRICS_RELABEL_CONFIG_ACTION_DROP MetricsRelabelConfigAction = "drop" + METRICS_RELABEL_CONFIG_ACTION_HASHMOD MetricsRelabelConfigAction = "hashmod" + METRICS_RELABEL_CONFIG_ACTION_KEEP MetricsRelabelConfigAction = "keep" + METRICS_RELABEL_CONFIG_ACTION_LABELDROP MetricsRelabelConfigAction = "labeldrop" + METRICS_RELABEL_CONFIG_ACTION_LABELKEEP MetricsRelabelConfigAction = "labelkeep" + METRICS_RELABEL_CONFIG_ACTION_LABELMAP MetricsRelabelConfigAction = "labelmap" + METRICS_RELABEL_CONFIG_ACTION_REPLACE MetricsRelabelConfigAction = "replace" ) // Defines values for PartialUpdateJSONBodyMetricsRelabelConfigsAction. const ( - PartialUpdateJSONBodyMetricsRelabelConfigsActionDROP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "drop" - PartialUpdateJSONBodyMetricsRelabelConfigsActionHASHMOD PartialUpdateJSONBodyMetricsRelabelConfigsAction = "hashmod" - PartialUpdateJSONBodyMetricsRelabelConfigsActionKEEP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "keep" - PartialUpdateJSONBodyMetricsRelabelConfigsActionLABELDROP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "labeldrop" - PartialUpdateJSONBodyMetricsRelabelConfigsActionLABELKEEP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "labelkeep" - PartialUpdateJSONBodyMetricsRelabelConfigsActionLABELMAP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "labelmap" - PartialUpdateJSONBodyMetricsRelabelConfigsActionREPLACE PartialUpdateJSONBodyMetricsRelabelConfigsAction = "replace" + PARTIAL_UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_DROP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "drop" + PARTIAL_UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_HASHMOD PartialUpdateJSONBodyMetricsRelabelConfigsAction = "hashmod" + PARTIAL_UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_KEEP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "keep" + PARTIAL_UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_LABELDROP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "labeldrop" + PARTIAL_UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_LABELKEEP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "labelkeep" + PARTIAL_UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_LABELMAP PartialUpdateJSONBodyMetricsRelabelConfigsAction = "labelmap" + PARTIAL_UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_REPLACE PartialUpdateJSONBodyMetricsRelabelConfigsAction = "replace" ) // Defines values for PartialUpdateJSONBodyScheme. const ( - PartialUpdateJSONBodySchemeHTTP PartialUpdateJSONBodyScheme = "http" - PartialUpdateJSONBodySchemeHTTPS PartialUpdateJSONBodyScheme = "https" + PARTIAL_UPDATE_JSON_BODY_SCHEME_HTTP PartialUpdateJSONBodyScheme = "http" + PARTIAL_UPDATE_JSON_BODY_SCHEME_HTTPS PartialUpdateJSONBodyScheme = "https" ) // Defines values for CreateJSONBodyMetricsRelabelConfigsAction. const ( - CreateJSONBodyMetricsRelabelConfigsActionDROP CreateJSONBodyMetricsRelabelConfigsAction = "drop" - CreateJSONBodyMetricsRelabelConfigsActionHASHMOD CreateJSONBodyMetricsRelabelConfigsAction = "hashmod" - CreateJSONBodyMetricsRelabelConfigsActionKEEP CreateJSONBodyMetricsRelabelConfigsAction = "keep" - CreateJSONBodyMetricsRelabelConfigsActionLABELDROP CreateJSONBodyMetricsRelabelConfigsAction = "labeldrop" - CreateJSONBodyMetricsRelabelConfigsActionLABELKEEP CreateJSONBodyMetricsRelabelConfigsAction = "labelkeep" - CreateJSONBodyMetricsRelabelConfigsActionLABELMAP CreateJSONBodyMetricsRelabelConfigsAction = "labelmap" - CreateJSONBodyMetricsRelabelConfigsActionREPLACE CreateJSONBodyMetricsRelabelConfigsAction = "replace" + CREATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_DROP CreateJSONBodyMetricsRelabelConfigsAction = "drop" + CREATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_HASHMOD CreateJSONBodyMetricsRelabelConfigsAction = "hashmod" + CREATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_KEEP CreateJSONBodyMetricsRelabelConfigsAction = "keep" + CREATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_LABELDROP CreateJSONBodyMetricsRelabelConfigsAction = "labeldrop" + CREATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_LABELKEEP CreateJSONBodyMetricsRelabelConfigsAction = "labelkeep" + CREATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_LABELMAP CreateJSONBodyMetricsRelabelConfigsAction = "labelmap" + CREATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_REPLACE CreateJSONBodyMetricsRelabelConfigsAction = "replace" ) // Defines values for CreateJSONBodyScheme. const ( - CreateJSONBodySchemeHTTP CreateJSONBodyScheme = "http" - CreateJSONBodySchemeHTTPS CreateJSONBodyScheme = "https" + CREATE_JSON_BODY_SCHEME_HTTP CreateJSONBodyScheme = "http" + CREATE_JSON_BODY_SCHEME_HTTPS CreateJSONBodyScheme = "https" ) // Defines values for UpdateJSONBodyMetricsRelabelConfigsAction. const ( - UpdateJSONBodyMetricsRelabelConfigsActionDROP UpdateJSONBodyMetricsRelabelConfigsAction = "drop" - UpdateJSONBodyMetricsRelabelConfigsActionHASHMOD UpdateJSONBodyMetricsRelabelConfigsAction = "hashmod" - UpdateJSONBodyMetricsRelabelConfigsActionKEEP UpdateJSONBodyMetricsRelabelConfigsAction = "keep" - UpdateJSONBodyMetricsRelabelConfigsActionLABELDROP UpdateJSONBodyMetricsRelabelConfigsAction = "labeldrop" - UpdateJSONBodyMetricsRelabelConfigsActionLABELKEEP UpdateJSONBodyMetricsRelabelConfigsAction = "labelkeep" - UpdateJSONBodyMetricsRelabelConfigsActionLABELMAP UpdateJSONBodyMetricsRelabelConfigsAction = "labelmap" - UpdateJSONBodyMetricsRelabelConfigsActionREPLACE UpdateJSONBodyMetricsRelabelConfigsAction = "replace" + UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_DROP UpdateJSONBodyMetricsRelabelConfigsAction = "drop" + UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_HASHMOD UpdateJSONBodyMetricsRelabelConfigsAction = "hashmod" + UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_KEEP UpdateJSONBodyMetricsRelabelConfigsAction = "keep" + UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_LABELDROP UpdateJSONBodyMetricsRelabelConfigsAction = "labeldrop" + UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_LABELKEEP UpdateJSONBodyMetricsRelabelConfigsAction = "labelkeep" + UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_LABELMAP UpdateJSONBodyMetricsRelabelConfigsAction = "labelmap" + UPDATE_JSON_BODY_METRICS_RELABEL_CONFIGS_ACTION_REPLACE UpdateJSONBodyMetricsRelabelConfigsAction = "replace" ) // Defines values for UpdateJSONBodyScheme. const ( - UpdateJSONBodySchemeHTTP UpdateJSONBodyScheme = "http" - UpdateJSONBodySchemeHTTPS UpdateJSONBodyScheme = "https" + UPDATE_JSON_BODY_SCHEME_HTTP UpdateJSONBodyScheme = "http" + UPDATE_JSON_BODY_SCHEME_HTTPS UpdateJSONBodyScheme = "https" ) // BasicAuth defines model for BasicAuth. diff --git a/pkg/services/argus/v1.0/generated/service.go b/pkg/services/argus/v1.0/generated/service.go index f561154c..81f08f24 100644 --- a/pkg/services/argus/v1.0/generated/service.go +++ b/pkg/services/argus/v1.0/generated/service.go @@ -5,9 +5,6 @@ import ( ) func NewService(c common.Client) *ClientWithResponses { - nc, _ := NewClientWithResponses( - "https://api.eu01.stackit.cloud", - WithHTTPClient(c), - ) + nc, _ := NewClientWithResponses("https://argus.api.eu01.stackit.cloud", WithHTTPClient(c)) return nc } diff --git a/pkg/services/argus/v1.0/generated/traces/traces.go b/pkg/services/argus/v1.0/generated/traces/traces.go index 3402134c..215897de 100644 --- a/pkg/services/argus/v1.0/generated/traces/traces.go +++ b/pkg/services/argus/v1.0/generated/traces/traces.go @@ -1,6 +1,6 @@ // Package traces provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package traces import ( diff --git a/pkg/services/argus/v1.0/include/instances/common.go b/pkg/services/argus/v1.0/include/instances/common.go new file mode 100644 index 00000000..d784574c --- /dev/null +++ b/pkg/services/argus/v1.0/include/instances/common.go @@ -0,0 +1,15 @@ +package instances + +import "github.com/SchwarzIT/community-stackit-go-client/pkg/services/argus/v1.0/generated/instances" + +type InstanceCreateResponse struct { + instances.ClientWithResponsesInterface +} + +type InstanceUpdateResponse struct { + instances.ClientWithResponsesInterface +} + +type InstanceDeleteResponse struct { + instances.ClientWithResponsesInterface +} diff --git a/pkg/services/argus/v1.0/include/instances/wait.go b/pkg/services/argus/v1.0/include/instances/wait.go new file mode 100644 index 00000000..bf373afb --- /dev/null +++ b/pkg/services/argus/v1.0/include/instances/wait.go @@ -0,0 +1,146 @@ +package instances + +import ( + "context" + "errors" + "fmt" + "net/http" + "strings" + "time" + + "github.com/SchwarzIT/community-stackit-go-client/pkg/services/argus/v1.0/generated/instances" + "github.com/SchwarzIT/community-stackit-go-client/pkg/wait" +) + +// WaitHandler will wait for instance creation +// returned interface is nil or *instances.ProjectInstanceUI +func (r InstanceCreateResponse) WaitHandler(ctx context.Context, c *instances.ClientWithResponses, projectID, instanceID string) *wait.Handler { + return wait.New(func() (res interface{}, done bool, err error) { + s, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + return nil, false, err + } + if s.HasError != nil { + return nil, false, s.HasError + } + if s.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if s.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_CREATE_SUCCEEDED { + return s.JSON200, true, nil + } + return s.JSON200, false, nil + }) +} + +// WaitHandler will wait for instance update +// returned interface is nil or *instances.ProjectInstanceUI +func (r InstanceUpdateResponse) WaitHandler(ctx context.Context, c *instances.ClientWithResponses, projectID, instanceID string) *wait.Handler { + return wait.New(func() (res interface{}, done bool, err error) { + s, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + return nil, false, err + } + if s.HasError != nil { + return nil, false, s.HasError + } + if s.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if s.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_UPDATE_SUCCEEDED { + return s.JSON200, true, nil + } + if s.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_UPDATE_FAILED { + return s.JSON200, true, fmt.Errorf("update failed for instance %s", instanceID) + } + if s.JSON200.Status != instances.PROJECT_INSTANCE_UI_STATUS_UPDATING { + // in some cases it takes a long time for the server to change the + // instance status to UPDATING + // the following code will wait for the status change for 5 minutes + // and continue the outer wait on change or fail + w := wait.New(func() (res interface{}, done bool, err error) { + si, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + return nil, false, err + } + if s.HasError != nil { + return nil, false, s.HasError + } + if s.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if si.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_UPDATING || + si.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_UPDATE_SUCCEEDED || + si.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_UPDATE_FAILED { + return nil, true, nil + } + return nil, false, nil + }) + _, err := w.SetTimeout(5 * time.Minute).Wait() + return nil, false, err + } + return s.JSON200, false, nil + }) +} + +// WaitHandler will wait for instance deletion +// returned interface is nil +func (r InstanceDeleteResponse) WaitHandler(ctx context.Context, c *instances.ClientWithResponses, projectID, instanceID string) *wait.Handler { + return wait.New(func() (res interface{}, done bool, err error) { + s, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + if strings.Contains(err.Error(), http.StatusText(http.StatusNotFound)) { + return nil, true, nil + } + return nil, false, err + } + if s.StatusCode() == http.StatusNotFound { + return nil, true, nil + } + if s.HasError != nil { + return nil, false, s.HasError + } + if s.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if s.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_DELETE_SUCCEEDED { + return nil, true, nil + } + if s.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_DELETE_FAILED { + return s.JSON200, true, fmt.Errorf("deletion failed for instance %s", instanceID) + } + if s.JSON200.Status != instances.PROJECT_INSTANCE_UI_STATUS_DELETING { + // in some cases it takes a long time for the server to change the + // instance status to status DELETING + // the following code will wait for the status change for 5 minutes + // and continue the outer wait on change or fail + w := wait.New(func() (res interface{}, done bool, err error) { + si, err := c.InstanceReadWithResponse(ctx, projectID, instanceID) + if err != nil { + if strings.Contains(err.Error(), http.StatusText(http.StatusNotFound)) { + return nil, true, nil + } + return nil, false, err + } + if si.StatusCode() == http.StatusNotFound { + return nil, true, nil + } + if si.HasError != nil { + return nil, false, s.HasError + } + if si.JSON200 == nil { + return nil, false, errors.New("received an empty response. JSON200 == nil") + } + if si.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_DELETING || + si.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_DELETE_FAILED || + si.JSON200.Status == instances.PROJECT_INSTANCE_UI_STATUS_DELETE_SUCCEEDED { + return nil, true, nil + } + return nil, false, nil + }) + _, err := w.SetTimeout(5 * time.Minute).Wait() + return nil, false, err + } + return nil, false, nil + }) +} diff --git a/pkg/services/argus/v1.0/include/service.go b/pkg/services/argus/v1.0/include/service.go index 7f88ff2b..584f6003 100644 --- a/pkg/services/argus/v1.0/include/service.go +++ b/pkg/services/argus/v1.0/include/service.go @@ -6,9 +6,6 @@ import ( ) func NewService(c common.Client) *argus.ClientWithResponses { - nc, _ := argus.NewClientWithResponses( - "https://argus.api.eu01.stackit.cloud", - argus.WithHTTPClient(c), - ) + nc, _ := argus.NewClientWithResponses("https://argus.api.eu01.stackit.cloud", argus.WithHTTPClient(c)) return nc } diff --git a/pkg/services/data-services/v1.0/config.yaml b/pkg/services/data-services/v1.0/config.yaml index 0cabbded..5de32286 100644 --- a/pkg/services/data-services/v1.0/config.yaml +++ b/pkg/services/data-services/v1.0/config.yaml @@ -20,10 +20,14 @@ output-options: copy: - from: include/service.go to: service.go - trim: "dataservices." + tidy: + - replace: "dataservices." + all: true - from: include/instances/wait.go to: instances/wait.go - trim: "instances." + tidy: + - replace: "instances." + all: true tidy: verbose: false functions: diff --git a/pkg/services/data-services/v1.0/generated/credentials/credentials.go b/pkg/services/data-services/v1.0/generated/credentials/credentials.go index 272d5c5a..ac3778b0 100644 --- a/pkg/services/data-services/v1.0/generated/credentials/credentials.go +++ b/pkg/services/data-services/v1.0/generated/credentials/credentials.go @@ -1,6 +1,6 @@ // Package credentials provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package credentials import ( diff --git a/pkg/services/data-services/v1.0/generated/dataservices.gen.go b/pkg/services/data-services/v1.0/generated/dataservices.gen.go index 1b5840ed..baadd83a 100644 --- a/pkg/services/data-services/v1.0/generated/dataservices.gen.go +++ b/pkg/services/data-services/v1.0/generated/dataservices.gen.go @@ -1,6 +1,6 @@ // Package dataservices provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package dataservices import ( diff --git a/pkg/services/data-services/v1.0/generated/instances/instances.go b/pkg/services/data-services/v1.0/generated/instances/instances.go index ae0f49a8..dffbeb2c 100644 --- a/pkg/services/data-services/v1.0/generated/instances/instances.go +++ b/pkg/services/data-services/v1.0/generated/instances/instances.go @@ -1,6 +1,6 @@ // Package instances provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package instances import ( diff --git a/pkg/services/data-services/v1.0/generated/offerings/offerings.go b/pkg/services/data-services/v1.0/generated/offerings/offerings.go index f8db6573..7559f7b8 100644 --- a/pkg/services/data-services/v1.0/generated/offerings/offerings.go +++ b/pkg/services/data-services/v1.0/generated/offerings/offerings.go @@ -1,6 +1,6 @@ // Package offerings provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package offerings import ( diff --git a/pkg/services/kubernetes/v1.0/config.yaml b/pkg/services/kubernetes/v1.0/config.yaml index db9f957a..1f08ed2f 100644 --- a/pkg/services/kubernetes/v1.0/config.yaml +++ b/pkg/services/kubernetes/v1.0/config.yaml @@ -21,16 +21,24 @@ output-options: copy: - from: include/cluster/wait.go to: cluster/wait.go - trim: "cluster." + tidy: + - replace: "cluster." + all: true - from: include/cluster/validate.go to: cluster/validate.go - trim: "cluster." + tidy: + - replace: "cluster." + all: true - from: include/service.go to: service.go - trim: "kubernetes." + tidy: + - replace: "kubernetes." + all: true - from: include/project/wait.go to: project/wait.go - trim: "project." + tidy: + - replace: "project." + all: true tidy: verbose: false functions: diff --git a/pkg/services/kubernetes/v1.0/generated/cluster/cluster.go b/pkg/services/kubernetes/v1.0/generated/cluster/cluster.go index 979b6954..04edb0ec 100644 --- a/pkg/services/kubernetes/v1.0/generated/cluster/cluster.go +++ b/pkg/services/kubernetes/v1.0/generated/cluster/cluster.go @@ -1,6 +1,6 @@ // Package cluster provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package cluster import ( diff --git a/pkg/services/kubernetes/v1.0/generated/credentials/credentials.go b/pkg/services/kubernetes/v1.0/generated/credentials/credentials.go index 45f6e1b1..bcb23b77 100644 --- a/pkg/services/kubernetes/v1.0/generated/credentials/credentials.go +++ b/pkg/services/kubernetes/v1.0/generated/credentials/credentials.go @@ -1,6 +1,6 @@ // Package credentials provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package credentials import ( diff --git a/pkg/services/kubernetes/v1.0/generated/kubernetes.gen.go b/pkg/services/kubernetes/v1.0/generated/kubernetes.gen.go index 40537dab..eb079ba5 100644 --- a/pkg/services/kubernetes/v1.0/generated/kubernetes.gen.go +++ b/pkg/services/kubernetes/v1.0/generated/kubernetes.gen.go @@ -1,6 +1,6 @@ // Package kubernetes provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package kubernetes import ( diff --git a/pkg/services/kubernetes/v1.0/generated/operation/operation.go b/pkg/services/kubernetes/v1.0/generated/operation/operation.go index ee409ae0..c5b6b31f 100644 --- a/pkg/services/kubernetes/v1.0/generated/operation/operation.go +++ b/pkg/services/kubernetes/v1.0/generated/operation/operation.go @@ -1,6 +1,6 @@ // Package operation provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package operation import ( diff --git a/pkg/services/kubernetes/v1.0/generated/project/project.go b/pkg/services/kubernetes/v1.0/generated/project/project.go index 435825b1..ff1fb70d 100644 --- a/pkg/services/kubernetes/v1.0/generated/project/project.go +++ b/pkg/services/kubernetes/v1.0/generated/project/project.go @@ -1,6 +1,6 @@ // Package project provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package project import ( diff --git a/pkg/services/kubernetes/v1.0/generated/provider-options/provider-options.go b/pkg/services/kubernetes/v1.0/generated/provider-options/provider-options.go index d9e55a60..76a74c44 100644 --- a/pkg/services/kubernetes/v1.0/generated/provider-options/provider-options.go +++ b/pkg/services/kubernetes/v1.0/generated/provider-options/provider-options.go @@ -1,6 +1,6 @@ // Package provideroptions provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package provideroptions import ( diff --git a/pkg/services/mongodb-flex/v1.0/config.yaml b/pkg/services/mongodb-flex/v1.0/config.yaml index cfa492fe..4d0c49cd 100644 --- a/pkg/services/mongodb-flex/v1.0/config.yaml +++ b/pkg/services/mongodb-flex/v1.0/config.yaml @@ -27,10 +27,14 @@ output-options: copy: - from: include/service.go to: service.go - trim: "mongodbflex." + tidy: + - replace: "mongodbflex." + all: true - from: include/instance/wait.go to: instance/wait.go - trim: "instance." + tidy: + - replace: "instance." + all: true tidy: verbose: false functions: diff --git a/pkg/services/mongodb-flex/v1.0/generated/backup/backup.go b/pkg/services/mongodb-flex/v1.0/generated/backup/backup.go index 9e5bc57d..4fc54a9d 100644 --- a/pkg/services/mongodb-flex/v1.0/generated/backup/backup.go +++ b/pkg/services/mongodb-flex/v1.0/generated/backup/backup.go @@ -1,6 +1,6 @@ // Package backup provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package backup import ( diff --git a/pkg/services/mongodb-flex/v1.0/generated/flavors/flavors.go b/pkg/services/mongodb-flex/v1.0/generated/flavors/flavors.go index 04c83ec4..23e48117 100644 --- a/pkg/services/mongodb-flex/v1.0/generated/flavors/flavors.go +++ b/pkg/services/mongodb-flex/v1.0/generated/flavors/flavors.go @@ -1,6 +1,6 @@ // Package flavors provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package flavors import ( diff --git a/pkg/services/mongodb-flex/v1.0/generated/instance/instance.go b/pkg/services/mongodb-flex/v1.0/generated/instance/instance.go index 9c0b9bcd..1183c0cb 100644 --- a/pkg/services/mongodb-flex/v1.0/generated/instance/instance.go +++ b/pkg/services/mongodb-flex/v1.0/generated/instance/instance.go @@ -1,6 +1,6 @@ // Package instance provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package instance import ( diff --git a/pkg/services/mongodb-flex/v1.0/generated/instance/wait.go b/pkg/services/mongodb-flex/v1.0/generated/instance/wait.go index 14131292..af43a440 100644 --- a/pkg/services/mongodb-flex/v1.0/generated/instance/wait.go +++ b/pkg/services/mongodb-flex/v1.0/generated/instance/wait.go @@ -36,10 +36,10 @@ func createOrUpdateWait(ctx context.Context, c *ClientWithResponses, projectID, if s.JSON200 == nil { return nil, false, errors.New("bad response") } - if s.JSON200.Item == nil || *s.JSON200.Item.Status == "" || *s.JSON200.Item.Status == consts.POSTGRES_STATUS_READY { + if s.JSON200.Item == nil || *s.JSON200.Item.Status == "" || *s.JSON200.Item.Status == consts.MONGO_DB_STATUS_READY { return s.JSON200.Item, true, nil } - if *s.JSON200.Item.Status == consts.POSTGRES_STATUS_FAILED { + if *s.JSON200.Item.Status == consts.MONGO_DB_STATUS_FAILED { return s.JSON200.Item, false, errors.New("received status FAILED from server") } return s.JSON200.Item, false, nil diff --git a/pkg/services/mongodb-flex/v1.0/generated/mongodbflex.gen.go b/pkg/services/mongodb-flex/v1.0/generated/mongodbflex.gen.go index 6e2e46c3..d0e8bb4a 100644 --- a/pkg/services/mongodb-flex/v1.0/generated/mongodbflex.gen.go +++ b/pkg/services/mongodb-flex/v1.0/generated/mongodbflex.gen.go @@ -1,6 +1,6 @@ // Package mongodbflex provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package mongodbflex import ( diff --git a/pkg/services/mongodb-flex/v1.0/generated/storage/storage.go b/pkg/services/mongodb-flex/v1.0/generated/storage/storage.go index 28d5dc03..e08396a1 100644 --- a/pkg/services/mongodb-flex/v1.0/generated/storage/storage.go +++ b/pkg/services/mongodb-flex/v1.0/generated/storage/storage.go @@ -1,6 +1,6 @@ // Package storage provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package storage import ( diff --git a/pkg/services/mongodb-flex/v1.0/generated/user/user.go b/pkg/services/mongodb-flex/v1.0/generated/user/user.go index 7fb76245..bd128315 100644 --- a/pkg/services/mongodb-flex/v1.0/generated/user/user.go +++ b/pkg/services/mongodb-flex/v1.0/generated/user/user.go @@ -1,6 +1,6 @@ // Package user provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package user import ( diff --git a/pkg/services/mongodb-flex/v1.0/generated/versions/versions.go b/pkg/services/mongodb-flex/v1.0/generated/versions/versions.go index e59ce319..f1f40c98 100644 --- a/pkg/services/mongodb-flex/v1.0/generated/versions/versions.go +++ b/pkg/services/mongodb-flex/v1.0/generated/versions/versions.go @@ -1,6 +1,6 @@ // Package versions provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package versions import ( diff --git a/pkg/services/postgres-flex/v1.0/config.yaml b/pkg/services/postgres-flex/v1.0/config.yaml index 16d124e4..5fa4a0aa 100644 --- a/pkg/services/postgres-flex/v1.0/config.yaml +++ b/pkg/services/postgres-flex/v1.0/config.yaml @@ -27,10 +27,14 @@ output-options: copy: - from: include/service.go to: service.go - trim: "postgresflex." + tidy: + - replace: "postgresflex." + all: true - from: include/instance/wait.go to: instance/wait.go - trim: "instance." + tidy: + - replace: "instance." + all: true tidy: verbose: false functions: diff --git a/pkg/services/postgres-flex/v1.0/generated/backups/backups.go b/pkg/services/postgres-flex/v1.0/generated/backups/backups.go index c912f7bf..e30c72d1 100644 --- a/pkg/services/postgres-flex/v1.0/generated/backups/backups.go +++ b/pkg/services/postgres-flex/v1.0/generated/backups/backups.go @@ -1,6 +1,6 @@ // Package backups provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package backups import ( diff --git a/pkg/services/postgres-flex/v1.0/generated/flavors/flavors.go b/pkg/services/postgres-flex/v1.0/generated/flavors/flavors.go index 8c82505d..9153ca69 100644 --- a/pkg/services/postgres-flex/v1.0/generated/flavors/flavors.go +++ b/pkg/services/postgres-flex/v1.0/generated/flavors/flavors.go @@ -1,6 +1,6 @@ // Package flavors provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package flavors import ( diff --git a/pkg/services/postgres-flex/v1.0/generated/instance/instance.go b/pkg/services/postgres-flex/v1.0/generated/instance/instance.go index 6ada49cf..710636e9 100644 --- a/pkg/services/postgres-flex/v1.0/generated/instance/instance.go +++ b/pkg/services/postgres-flex/v1.0/generated/instance/instance.go @@ -1,6 +1,6 @@ // Package instance provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package instance import ( diff --git a/pkg/services/postgres-flex/v1.0/generated/postgresflex.gen.go b/pkg/services/postgres-flex/v1.0/generated/postgresflex.gen.go index 40fc367b..910363c0 100644 --- a/pkg/services/postgres-flex/v1.0/generated/postgresflex.gen.go +++ b/pkg/services/postgres-flex/v1.0/generated/postgresflex.gen.go @@ -1,6 +1,6 @@ // Package postgresflex provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package postgresflex import ( diff --git a/pkg/services/postgres-flex/v1.0/generated/storage/storage.go b/pkg/services/postgres-flex/v1.0/generated/storage/storage.go index 85489b64..e729e96c 100644 --- a/pkg/services/postgres-flex/v1.0/generated/storage/storage.go +++ b/pkg/services/postgres-flex/v1.0/generated/storage/storage.go @@ -1,6 +1,6 @@ // Package storage provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package storage import ( diff --git a/pkg/services/postgres-flex/v1.0/generated/users/users.go b/pkg/services/postgres-flex/v1.0/generated/users/users.go index 5f675865..cc58e70e 100644 --- a/pkg/services/postgres-flex/v1.0/generated/users/users.go +++ b/pkg/services/postgres-flex/v1.0/generated/users/users.go @@ -1,6 +1,6 @@ // Package users provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package users import ( diff --git a/pkg/services/postgres-flex/v1.0/generated/versions/versions.go b/pkg/services/postgres-flex/v1.0/generated/versions/versions.go index 536d20eb..36bcaae8 100644 --- a/pkg/services/postgres-flex/v1.0/generated/versions/versions.go +++ b/pkg/services/postgres-flex/v1.0/generated/versions/versions.go @@ -1,6 +1,6 @@ // Package versions provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT. +// Code generated by github.com/do87/oapi-codegen version v0.5.0 DO NOT EDIT. package versions import (