Skip to content

Commit 0981619

Browse files
authored
Recompile plugin with steampipe-plugin-sdk v5.2.0 (#438)
1 parent cf32f50 commit 0981619

File tree

96 files changed

+674
-628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+674
-628
lines changed

gcp/compute_location_list.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package gcp
33
import (
44
"context"
55

6-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
6+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
77
)
88

99
// func init() {
@@ -44,7 +44,7 @@ func BuildComputeLocationList(ctx context.Context, d *plugin.QueryData) []map[st
4444
// validate location list
4545
matrix := make([]map[string]interface{}, len(resp.Items))
4646
for i, location := range resp.Items {
47-
matrix[i] = map[string]interface{}{matrixKeyLocation: location}
47+
matrix[i] = map[string]interface{}{matrixKeyLocation: location.Name}
4848
}
4949
d.ConnectionManager.Cache.Set(locationCacheKey, matrix)
5050
return matrix

gcp/connection_config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package gcp
22

33
import (
4-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
5-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/schema"
4+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
5+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/schema"
66
)
77

88
type gcpConfig struct {

gcp/ignore_error_predicate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/turbot/go-kit/helpers"
88
"github.com/turbot/go-kit/types"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
1010
"google.golang.org/api/googleapi"
1111
)
1212

gcp/kms_multi_location.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package gcp
33
import (
44
"context"
55

6-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
6+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
77
)
88

99
// var pluginQueryData *plugin.QueryData

gcp/monitoring_metric.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"strings"
77
"time"
88

9-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
11-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
11+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1212
"google.golang.org/api/monitoring/v3"
1313
)
1414

gcp/plugin.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ package gcp
99
import (
1010
"context"
1111

12-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
13-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
12+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
13+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1414
)
1515

1616
const pluginName = "steampipe-plugin-gcp"

gcp/service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package gcp
33
import (
44
"context"
55

6-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
6+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
77
"google.golang.org/api/accessapproval/v1"
88
"google.golang.org/api/bigquery/v2"
99
"google.golang.org/api/bigtableadmin/v2"

gcp/table_gcp_audit_policy.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package gcp
33
import (
44
"context"
55

6-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
7-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
6+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
7+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
99

1010
"google.golang.org/api/cloudresourcemanager/v1"
1111
)

gcp/table_gcp_bigquery_dataset.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"strings"
66

77
"github.com/turbot/go-kit/types"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1111

1212
"google.golang.org/api/bigquery/v2"
1313
)
@@ -183,7 +183,7 @@ func listBigQueryDatasets(ctx context.Context, d *plugin.QueryData, h *plugin.Hy
183183

184184
// Check if context has been cancelled or if the limit has been hit (if specified)
185185
// if there is a limit, it will return the number of rows required to reach this limit
186-
if d.QueryStatus.RowsRemaining(ctx) == 0 {
186+
if d.RowsRemaining(ctx) == 0 {
187187
page.NextPageToken = ""
188188
return nil
189189
}
@@ -218,7 +218,7 @@ func getBigQueryDataset(ctx context.Context, d *plugin.QueryData, h *plugin.Hydr
218218
data := datasetID(h.Item)
219219
id = strings.Split(data, ":")[1]
220220
} else {
221-
id = d.KeyColumnQuals["dataset_id"].GetStringValue()
221+
id = d.EqualsQuals["dataset_id"].GetStringValue()
222222
}
223223

224224
// check if id is empty

gcp/table_gcp_bigquery_job.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"strings"
66

77
"github.com/turbot/go-kit/types"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1111
"google.golang.org/api/bigquery/v2"
1212
)
1313

@@ -275,7 +275,7 @@ func listBigQueryJobs(ctx context.Context, d *plugin.QueryData, h *plugin.Hydrat
275275

276276
// Check if context has been cancelled or if the limit has been hit (if specified)
277277
// if there is a limit, it will return the number of rows required to reach this limit
278-
if d.QueryStatus.RowsRemaining(ctx) == 0 {
278+
if d.RowsRemaining(ctx) == 0 {
279279
page.NextPageToken = ""
280280
return nil
281281
}
@@ -310,7 +310,7 @@ func getBigQueryJob(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateD
310310
data := jobID(h.Item)
311311
id = strings.Split(data, ".")[1]
312312
} else {
313-
id = d.KeyColumnQuals["job_id"].GetStringValue()
313+
id = d.EqualsQuals["job_id"].GetStringValue()
314314
}
315315

316316
// handle empty id in get call

gcp/table_gcp_bigquery_table.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"strings"
66

77
"github.com/turbot/go-kit/types"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1111
"google.golang.org/api/bigquery/v2"
1212
)
1313

@@ -281,7 +281,7 @@ func listBigqueryTables(ctx context.Context, d *plugin.QueryData, h *plugin.Hydr
281281

282282
// Check if context has been cancelled or if the limit has been hit (if specified)
283283
// if there is a limit, it will return the number of rows required to reach this limit
284-
if d.QueryStatus.RowsRemaining(ctx) == 0 {
284+
if d.RowsRemaining(ctx) == 0 {
285285
page.NextPageToken = ""
286286
return nil
287287
}
@@ -318,8 +318,8 @@ func getBigqueryTable(ctx context.Context, d *plugin.QueryData, h *plugin.Hydrat
318318
datasetID = data.TableReference.DatasetId
319319
id = data.TableReference.TableId
320320
} else {
321-
datasetID = d.KeyColumnQuals["dataset_id"].GetStringValue()
322-
id = d.KeyColumnQuals["table_id"].GetStringValue()
321+
datasetID = d.EqualsQuals["dataset_id"].GetStringValue()
322+
id = d.EqualsQuals["table_id"].GetStringValue()
323323
}
324324

325325
// Empty Check

gcp/table_gcp_bigtable_instance.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"context"
55
"strings"
66

7-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
7+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1010

1111
"google.golang.org/api/bigtableadmin/v2"
1212
)
@@ -152,7 +152,7 @@ func getBigtableInstance(ctx context.Context, d *plugin.QueryData, h *plugin.Hyd
152152
}
153153
project := projectId.(string)
154154

155-
name := d.KeyColumnQuals["name"].GetStringValue()
155+
name := d.EqualsQuals["name"].GetStringValue()
156156

157157
resp, err := service.Projects.Instances.Get("projects/" + project + "/instances/" + name).Do()
158158
if err != nil {

gcp/table_gcp_cloudfunctions_function.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"strings"
77

88
"github.com/turbot/go-kit/types"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
11-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
11+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1212

1313
"google.golang.org/api/cloudfunctions/v1"
1414
)
@@ -238,7 +238,7 @@ func listCloudFunctions(ctx context.Context, d *plugin.QueryData, h *plugin.Hydr
238238

239239
// Check if context has been cancelled or if the limit has been hit (if specified)
240240
// if there is a limit, it will return the number of rows required to reach this limit
241-
if d.QueryStatus.RowsRemaining(ctx) == 0 {
241+
if d.RowsRemaining(ctx) == 0 {
242242
page.NextPageToken = ""
243243
return nil
244244
}
@@ -270,8 +270,8 @@ func getCloudFunction(ctx context.Context, d *plugin.QueryData, h *plugin.Hydrat
270270
}
271271
project := projectId.(string)
272272

273-
name := d.KeyColumnQuals["name"].GetStringValue()
274-
location := d.KeyColumnQuals["location"].GetStringValue()
273+
name := d.EqualsQuals["name"].GetStringValue()
274+
location := d.EqualsQuals["location"].GetStringValue()
275275

276276
// API https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions/get
277277
cloudFunction, err := service.Projects.Locations.Functions.Get("projects/" + project + "/locations/" + location + "/functions/" + name).Do()

gcp/table_gcp_compute_address.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"strings"
66

77
"github.com/turbot/go-kit/types"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1111

1212
"google.golang.org/api/compute/v1"
1313
)
@@ -196,7 +196,7 @@ func listComputeAddresses(ctx context.Context, d *plugin.QueryData, h *plugin.Hy
196196

197197
// Check if context has been cancelled or if the limit has been hit (if specified)
198198
// if there is a limit, it will return the number of rows required to reach this limit
199-
if d.QueryStatus.RowsRemaining(ctx) == 0 {
199+
if d.RowsRemaining(ctx) == 0 {
200200
page.NextPageToken = ""
201201
return nil
202202
}
@@ -227,7 +227,7 @@ func getComputeAddress(ctx context.Context, d *plugin.QueryData, h *plugin.Hydra
227227
project := projectId.(string)
228228

229229
var address compute.Address
230-
name := d.KeyColumnQuals["name"].GetStringValue()
230+
name := d.EqualsQuals["name"].GetStringValue()
231231

232232
// Empty check
233233
if name == "" {

gcp/table_gcp_compute_autoscaler.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"strings"
66

77
"github.com/turbot/go-kit/types"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1111
"google.golang.org/api/compute/v1"
1212
)
1313

@@ -179,7 +179,7 @@ func listComputeAutoscaler(ctx context.Context, d *plugin.QueryData, h *plugin.H
179179

180180
// Check if context has been cancelled or if the limit has been hit (if specified)
181181
// if there is a limit, it will return the number of rows required to reach this limit
182-
if d.QueryStatus.RowsRemaining(ctx) == 0 {
182+
if d.RowsRemaining(ctx) == 0 {
183183
page.NextPageToken = ""
184184
return nil
185185
}
@@ -207,7 +207,7 @@ func getComputeAutoscaler(ctx context.Context, d *plugin.QueryData, h *plugin.Hy
207207
project := projectId.(string)
208208

209209
var autoscaler compute.Autoscaler
210-
name := d.KeyColumnQuals["name"].GetStringValue()
210+
name := d.EqualsQuals["name"].GetStringValue()
211211
if name == "" {
212212
return nil, nil
213213
}

gcp/table_gcp_compute_backend_bucket.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"strings"
66

77
"github.com/turbot/go-kit/types"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1111

1212
"google.golang.org/api/compute/v1"
1313
)
@@ -164,7 +164,7 @@ func listComputeBackendBuckets(ctx context.Context, d *plugin.QueryData, h *plug
164164

165165
// Check if context has been cancelled or if the limit has been hit (if specified)
166166
// if there is a limit, it will return the number of rows required to reach this limit
167-
if d.QueryStatus.RowsRemaining(ctx) == 0 {
167+
if d.RowsRemaining(ctx) == 0 {
168168
page.NextPageToken = ""
169169
return nil
170170
}
@@ -194,7 +194,7 @@ func getComputeBackendBucket(ctx context.Context, d *plugin.QueryData, h *plugin
194194
}
195195
project := projectId.(string)
196196

197-
name := d.KeyColumnQuals["name"].GetStringValue()
197+
name := d.EqualsQuals["name"].GetStringValue()
198198

199199
// Error: pq: rpc error: code = Unknown desc = json: invalid use of ,string struct tag,
200200
// trying to unmarshal "projects/project/global/backendBuckets/" into uint64

gcp/table_gcp_compute_backend_service.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"strings"
66

77
"github.com/turbot/go-kit/types"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1111

1212
"google.golang.org/api/compute/v1"
1313
)
@@ -286,7 +286,7 @@ func listComputeBackendServices(ctx context.Context, d *plugin.QueryData, h *plu
286286

287287
// Check if context has been cancelled or if the limit has been hit (if specified)
288288
// if there is a limit, it will return the number of rows required to reach this limit
289-
if d.QueryStatus.RowsRemaining(ctx) == 0 {
289+
if d.RowsRemaining(ctx) == 0 {
290290
page.NextPageToken = ""
291291
return nil
292292
}
@@ -318,7 +318,7 @@ func getComputeBackendService(ctx context.Context, d *plugin.QueryData, h *plugi
318318
project := projectId.(string)
319319

320320
var backendService compute.BackendService
321-
name := d.KeyColumnQuals["name"].GetStringValue()
321+
name := d.EqualsQuals["name"].GetStringValue()
322322

323323
resp := service.BackendServices.AggregatedList(project).Filter("name=" + name)
324324
if err := resp.Pages(

gcp/table_gcp_compute_disk.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"strings"
66

77
"github.com/turbot/go-kit/types"
8-
"github.com/turbot/steampipe-plugin-sdk/v4/grpc/proto"
9-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin"
10-
"github.com/turbot/steampipe-plugin-sdk/v4/plugin/transform"
8+
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
9+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
10+
"github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform"
1111
"google.golang.org/api/compute/v1"
1212
)
1313

@@ -307,7 +307,7 @@ func listComputeDisk(ctx context.Context, d *plugin.QueryData, h *plugin.Hydrate
307307

308308
// Check if context has been cancelled or if the limit has been hit (if specified)
309309
// if there is a limit, it will return the number of rows required to reach this limit
310-
if d.QueryStatus.RowsRemaining(ctx) == 0 {
310+
if d.RowsRemaining(ctx) == 0 {
311311
page.NextPageToken = ""
312312
return nil
313313
}
@@ -341,7 +341,7 @@ func getComputeDisk(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateD
341341
project := projectId.(string)
342342

343343
var disk compute.Disk
344-
name := d.KeyColumnQuals["name"].GetStringValue()
344+
name := d.EqualsQuals["name"].GetStringValue()
345345

346346
resp := service.Disks.AggregatedList(project).Filter("name=" + name)
347347
if err := resp.Pages(ctx, func(page *compute.DiskAggregatedList) error {

0 commit comments

Comments
 (0)