Skip to content

Commit 7ca6764

Browse files
authored
Merge pull request #79 from OpsHelmInc/fix-types
fix some mismatched types
2 parents f10fb29 + e8e502c commit 7ca6764

File tree

7 files changed

+16
-87
lines changed

7 files changed

+16
-87
lines changed

codegen/recipes/ecs.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/cloudquery/plugin-sdk/codegen"
99
"github.com/cloudquery/plugin-sdk/schema"
1010

11-
"github.com/OpsHelmInc/cloudquery/resources/services/ecs/models"
11+
"github.com/OpsHelmInc/ohaws"
1212
)
1313

1414
func ECSResources() []*Resource {
@@ -104,11 +104,12 @@ func ECSResources() []*Resource {
104104
Relations: []string{},
105105
},
106106
{
107-
SubService: "task_definitions",
108-
Struct: &models.TaskDefinitionWrapper{},
109-
Description: "https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskDefinition.html",
110-
SkipFields: []string{"TaskDefinitionArn", "Tags"},
111-
PreResourceResolver: "getTaskDefinition",
107+
SubService: "task_definitions",
108+
Struct: &ohaws.TaskDefinition{},
109+
UnwrapEmbeddedStructs: true,
110+
Description: "https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskDefinition.html",
111+
SkipFields: []string{"TaskDefinitionArn", "Tags"},
112+
PreResourceResolver: "getTaskDefinition",
112113
ExtraColumns: append(
113114
defaultRegionalColumns,
114115
[]codegen.ColumnDefinition{

codegen/recipes/kinesis.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
package recipes
22

33
import (
4-
"github.com/aws/aws-sdk-go-v2/service/kinesis/types"
54
"github.com/cloudquery/plugin-sdk/codegen"
65
"github.com/cloudquery/plugin-sdk/schema"
6+
7+
"github.com/OpsHelmInc/ohaws"
78
)
89

910
func KinesisResources() []*Resource {
1011
resources := []*Resource{
1112
{
1213
SubService: "streams",
13-
Struct: &types.StreamDescriptionSummary{},
14+
Struct: &ohaws.KinesisStream{},
1415
Description: "https://docs.aws.amazon.com/kinesis/latest/APIReference/API_StreamDescriptionSummary.html",
1516
SkipFields: []string{"StreamARN"},
1617
PreResourceResolver: "getStream",
@@ -23,11 +24,6 @@ func KinesisResources() []*Resource {
2324
Resolver: `schema.PathResolver("StreamARN")`,
2425
Options: schema.ColumnCreationOptions{PrimaryKey: true},
2526
},
26-
{
27-
Name: "tags",
28-
Type: schema.TypeJSON,
29-
Resolver: `resolveKinesisStreamTags`,
30-
},
3127
}...),
3228
},
3329
}

docs/tables/aws_kinesis_streams.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,5 @@ The primary key for this table is **arn**.
1616
|account_id|String|
1717
|region|String|
1818
|arn (PK)|String|
19-
|tags|JSON|
20-
|enhanced_monitoring|JSON|
21-
|open_shard_count|Int|
22-
|retention_period_hours|Int|
23-
|stream_creation_timestamp|Timestamp|
24-
|stream_name|String|
25-
|stream_status|String|
26-
|consumer_count|Int|
27-
|encryption_type|String|
28-
|key_id|String|
29-
|stream_mode_details|JSON|
19+
|stream_description_summary|JSON|
20+
|tags|JSON|

resources/services/ecs/models/ecs.go

Lines changed: 0 additions & 8 deletions
This file was deleted.

resources/services/kinesis/streams.go

Lines changed: 4 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/services/kinesis/streams_fetch.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,3 @@ func getKinesisStreamTags(ctx context.Context, svc services.KinesisClient, strea
7575

7676
return tags, nil
7777
}
78-
79-
func resolveKinesisStreamTags(ctx context.Context, meta schema.ClientMeta, resource *schema.Resource, c schema.Column) error {
80-
r := resource.Item.(*ohaws.KinesisStream)
81-
return resource.Set(c.Name, client.TagsToMap(r.Tags))
82-
}

resources/services/s3/models/s3.go

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)