Skip to content

Commit

Permalink
create endpoints using egoscale 3.1.6 structs
Browse files Browse the repository at this point in the history
  • Loading branch information
simisoft-exo committed Sep 19, 2024
1 parent 686fa4b commit 946301c
Show file tree
Hide file tree
Showing 17 changed files with 792 additions and 405 deletions.
4 changes: 2 additions & 2 deletions cmd/dbaas_external_endpoint_create_datadog.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ func (c *dbaasExternalEndpointCreateCmd) createDatadog(_ *cobra.Command, _ []str
}
}

datadogRequestPayload := v3.CreateDBAASExternalEndpointDatadogRequest{
Settings: &v3.DBAASEndpointDatadog{},
datadogRequestPayload := v3.DBAASEndpointDatadogPayload{
Settings: &v3.DBAASEndpointDatadogPayloadSettings{},
}

if c.DatadogAPIKey != "" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/dbaas_external_endpoint_create_elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func (c *dbaasExternalEndpointCreateCmd) createElasticsearch(_ *cobra.Command, _
return err
}

elasticsearchRequestPayload := v3.CreateDBAASExternalEndpointElasticsearchRequest{
Settings: &v3.DBAASEndpointElasticsearch{},
elasticsearchRequestPayload := v3.DBAASEndpointElasticsearchPayload{
Settings: &v3.DBAASEndpointElasticsearchPayloadSettings{},
}

if c.ElasticsearchURL != "" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/dbaas_external_endpoint_create_opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func (c *dbaasExternalEndpointCreateCmd) createOpensearch(_ *cobra.Command, _ []
return err
}

opensearchRequestPayload := v3.CreateDBAASExternalEndpointOpensearchRequest{
Settings: &v3.DBAASEndpointOpensearch{},
opensearchRequestPayload := v3.DBAASEndpointOpensearchPayload{
Settings: &v3.DBAASEndpointOpensearchPayloadSettings{},
}

if c.OpensearchURL != "" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/dbaas_external_endpoint_create_prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func (c *dbaasExternalEndpointCreateCmd) createPrometheus(_ *cobra.Command, _ []
return err
}

prometheusRequestPayload := v3.CreateDBAASExternalEndpointPrometheusRequest{
Settings: &v3.DBAASEndpointPrometheus{},
prometheusRequestPayload := v3.DBAASEndpointPrometheusPayload{
Settings: &v3.DBAASEndpointPrometheusPayloadSettings{},
}

if c.PrometheusBasicAuthPassword != "" {
Expand Down
4 changes: 2 additions & 2 deletions cmd/dbaas_external_endpoint_create_rsyslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func (c *dbaasExternalEndpointCreateCmd) createRsyslog(_ *cobra.Command, _ []str
return err
}

rsyslogRequestPayload := v3.CreateDBAASExternalEndpointRsyslogRequest{
Settings: &v3.DBAASEndpointRsyslog{},
rsyslogRequestPayload := v3.DBAASEndpointRsyslogPayload{
Settings: &v3.DBAASEndpointRsyslogPayloadSettings{},
}

if c.RsyslogCA != "" {
Expand Down
1 change: 0 additions & 1 deletion cmd/dbaas_external_endpoint_show_datadog.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func (o *datadogOutput) ToTable() {
t.Append([]string{"Endpoint Type", o.Type})

settings := o.Settings
t.Append([]string{"Datadog API Key", settings.DatadogAPIKey})
t.Append([]string{"Site", string(settings.Site)})

disableConsumerStats := "false"
Expand Down
1 change: 0 additions & 1 deletion cmd/dbaas_external_endpoint_show_elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func (o *elasticsearchOutput) ToTable() {
settings := o.Settings
t.Append([]string{"Elasticsearch URL", settings.URL})
t.Append([]string{"Index Prefix", settings.IndexPrefix})
t.Append([]string{"CA Certificate", truncateString(settings.CA, 50)})
t.Append([]string{"Index Days Max", strconv.FormatInt(settings.IndexDaysMax, 10)})
t.Append([]string{"Timeout", strconv.FormatInt(settings.Timeout, 10)})
}
Expand Down
1 change: 0 additions & 1 deletion cmd/dbaas_external_endpoint_show_opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func (o *opensearchOutput) ToTable() {
settings := o.Settings
t.Append([]string{"OpenSearch URL", settings.URL})
t.Append([]string{"Index Prefix", settings.IndexPrefix})
t.Append([]string{"CA Certificate", truncateString(settings.CA, 50)})
t.Append([]string{"Index Days Max", strconv.FormatInt(settings.IndexDaysMax, 10)})
t.Append([]string{"Timeout", strconv.FormatInt(settings.Timeout, 10)})
}
Expand Down
1 change: 0 additions & 1 deletion cmd/dbaas_external_endpoint_show_prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func (o *prometheusOutput) ToTable() {

settings := o.Settings
t.Append([]string{"Basic Auth Username", settings.BasicAuthUsername})
t.Append([]string{"Basic Auth Password", settings.BasicAuthPassword})
}

func (c *dbaasExternalEndpointShowCmd) showPrometheus() (output.Outputter, error) {
Expand Down
4 changes: 0 additions & 4 deletions cmd/dbaas_external_endpoint_show_rsyslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,9 @@ if settings.Tls != nil && *settings.Tls {
t.Append([]string{"Server", settings.Server})
t.Append([]string{"Port", strconv.FormatInt(settings.Port,10)})
t.Append([]string{"Tls", tls})
t.Append([]string{"CA Certificate", truncateString(settings.CA, 50)})
t.Append([]string{"Client Certificate", truncateString(settings.Cert, 50)})
t.Append([]string{"Client Key", truncateString(settings.Key, 50)})
t.Append([]string{"Max Message Size", strconv.FormatInt(settings.MaxMessageSize, 10)})
t.Append([]string{"Structured data block", settings.SD})
t.Append([]string{"Custom logline format", settings.Logline})
t.Append([]string{"Custom logline format", settings.Logline})
}

func (c *dbaasExternalEndpointShowCmd) showRsyslog() (output.Outputter, error) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/aws/smithy-go v1.1.0
github.com/dustin/go-humanize v1.0.1
github.com/exoscale/egoscale v0.102.4
github.com/exoscale/egoscale/v3 v3.1.4
github.com/exoscale/egoscale/v3 v3.1.6
github.com/exoscale/openapi-cli-generator v1.1.0
github.com/fatih/camelcase v1.0.0
github.com/google/uuid v1.4.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws=
github.com/exoscale/egoscale v0.102.4 h1:GBKsZMIOzwBfSu+4ZmWka3Ejf2JLiaBDHp4CQUgvp2E=
github.com/exoscale/egoscale v0.102.4/go.mod h1:ROSmPtle0wvf91iLZb09++N/9BH2Jo9XxIpAEumvocA=
github.com/exoscale/egoscale/v3 v3.1.4 h1:xpKEGX58GIC3CHTsJdRB5+ij74DmgWPts/n8OrItJ6s=
github.com/exoscale/egoscale/v3 v3.1.4/go.mod h1:GHKucK/J26v8PGWztGdhxWNMjrjG9PbelxKCJ4YI11Q=
github.com/exoscale/egoscale/v3 v3.1.6 h1:bTxsGG2B+9iHjziTfiySJ+FiZHyAiKiIoTs/Qfq6Orw=
github.com/exoscale/egoscale/v3 v3.1.6/go.mod h1:GHKucK/J26v8PGWztGdhxWNMjrjG9PbelxKCJ4YI11Q=
github.com/exoscale/openapi-cli-generator v1.1.0 h1:fYjmPqHR5vxlOBrbvde7eo7bISNQIFxsGn4A5/acwKA=
github.com/exoscale/openapi-cli-generator v1.1.0/go.mod h1:TZBnbT7f3hJ5ImyUphJwRM+X5xF/zCQZ6o8a42gQeTs=
github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8=
Expand Down
125 changes: 79 additions & 46 deletions vendor/github.com/exoscale/egoscale/v3/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 946301c

Please sign in to comment.